2200
How can I delete the selected items (including descendants)

PROCEDURE OnKeyDown(oG2antt,KeyCode,Shift)
	oG2antt:RemoveSelection()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:KeyDown := {|KeyCode,Shift| OnKeyDown(oG2antt,KeyCode,Shift)} /*Occurs when the user presses a key while an object has the focus.*/

		oG2antt:BeginUpdate()
		oG2antt:SingleSel := .F.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","08/03/2017","08/09/2017")
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","08/04/2017","08/13/2017","")
			oItems:SetProperty("SelectItem",h,.T.)
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2199
Dark mode

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL back,fore

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		back := 65536
		fore := 16777215
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQgmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThdr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA")
		oG2antt:VisualAppearance():Add(2,"gBFLBCJwBAEHhEJAAEhABPMIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwHCMIhiGwcAChEZYHgkMYmDAMUhSE78axHG6PY7kKZ4biaKIqQLLEhSfJ0YyBECBZpfebIbjmIZMSLEIxDKItJSpCIaRgqWS6ahGO4JUbUFLQHT9IR4daIYRgEEBA")
		oG2antt:VisualAppearance():Add(3,"gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwGAsEwjAoYAChEaILgkMw2DBIQwgJIMEr/G6RZxjeL5CjmG4nDhKMpybAcXxjBIYZJgOQpXb+PobTrNNLzfRFAxVAaWJikcZ4HpIAJNVLFdQ0XYMNSBISsBqrKiKcpeIIDWBZMbRZT1ZABCIZBpEW6LahENQwXrCN74DYkNTdKaxbbuaaXLhGCYBgIA==")
		oG2antt:HeaderAppearance := 5/*Bump*/
		oG2antt:SetProperty("BackColor",back)
		oG2antt:SetProperty("BackColorHeader",back)
		oG2antt:SetProperty("BackColorLevelHeader",back)
		oG2antt:SetProperty("BackColorSortBar",back)
		oG2antt:SetProperty("BackColorSortBarCaption",back)
		oG2antt:SetProperty("FilterBarBackColor",back)
		oG2antt:SetProperty("FilterBarForeColor",fore)
		oG2antt:SetProperty("ForeColor",fore)
		oG2antt:SetProperty("ForeColorHeader",fore)
		oG2antt:SetProperty("ForeColorSortBar",fore)
		oG2antt:SetProperty("SelBackColor",fore)
		oG2antt:SetProperty("SelForeColor",back)
		oG2antt:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1000000)
		oG2antt:SetProperty("Background",18/*exSplitBar*/,0x2000000)
		oG2antt:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oG2antt:SetProperty("Background",64/*exToolTipAppearance*/,0x3000000)
		oG2antt:SetProperty("Background",65/*exToolTipBackColor*/,back)
		oG2antt:SetProperty("Background",66/*exToolTipForeColor*/,fore)
		oG2antt:SetProperty("Background",20/*exSelBackColorFilter*/,fore)
		oG2antt:SetProperty("Background",21/*exSelForeColorFilter*/,back)
		oG2antt:SetProperty("Background",26/*exBackColorFilter*/,back)
		oG2antt:SetProperty("Background",27/*exForeColorFilter*/,fore)
		oG2antt:SetProperty("Background",28/*exSortBarLinkColor*/,back)
		oG2antt:SetProperty("Background",142/*exCSplitBar*/,0x2000000)
		oG2antt:SetProperty("Background",141/*exHSplitBar*/,0x2000000)
		oG2antt:SetProperty("Background",186/*exTreeLinesColor*/,fore)
		oG2antt:SetProperty("Background",511/*exScrollSizeGrip*/,back)
		oG2antt:SetProperty("Description",25/*exFilterBarExclude*/,"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>")
		oChart := oG2antt:Chart()
			oChart:SetProperty("BackColor",back)
			oChart:SetProperty("BackColorLevelHeader",back)
			oChart:SetProperty("ForeColor",fore)
			oChart:SetProperty("ForeColorLevelHeader",fore)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2198
I have changed the font, but the item's height remains the same. What I am doing wrong

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .F.
		oG2antt:LoadXML("http://www.exontrol.net/testing.xml")
		oG2antt:Font():Size := 22
		oG2antt:HeaderHeight := 42
		oG2antt:DefaultItemHeight := 36
		oG2antt:Items():SetProperty("ItemHeight",0,oG2antt:DefaultItemHeight())
		oG2antt:Chart():UnitWidth := oG2antt:DefaultItemHeight()
		oG2antt:Chart():UnitScale := oG2antt:Chart():UnitScale()
		oG2antt:Chart():Bars:Item("Task"):Height := 18
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2197
I have changed from Project Summary Task to own task created with EBN to get a black frame then using different colors for project status. How can I enlarge the EBN being applied to the head-arrows shows the start/end margins of the range

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBold",Item,.T.)
		oItems:AddBar(Item,oItems:CellValue(Item,oItems:GroupItem(Item)),"12/02/2017","12/02/2017")
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/10/2017")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCQBQAWCQ1DAJIqjOAkEhiGCUQClYYZBjWG4dQLOEYTNC8WwHCIZBpEWgKChGKAlSANMjTZLkdR1ECmIhoSg4coKMoERBJco1BDdOQGAyEQShEC4fgmVwAP7aNoWVC1JynM6XaKmGbJAA6CZgQKGFh2LAdTzSf61cAtWpaUjmRZaYSAFDxpiCYpfQjdUB2JDVfTVP6LbawS4KZgOR5eRboETYeAFcSZGrNMKEXLLSyudKRRreWQaPpGCZTRSUdZxSrbBhvEqlbRNMhwSBEEigNIxToOU4jFgeCROQwQRK9BBoG0CQUEIdhAAyJJvjUeZdmmb5+C8HhiAeZJznoPQ+EgT4rlua4BjCfg+k8d5TkUCZ4w+fxfB+X5xn4fheGebZoH8X53koAR9CASAWAUfofjgJgKH+IJHnGcIDmER5iBE" +;
		"eZgmgVgLgGYYYGoFRTCGaIGAYRYiCiFgmgmYQEF4KIKmKSBRBqCxjAiRgvgwYxIiGQYNmOCJlDUOpeAQBCAg=")
			oAppearance:Add(2,"CP:1 -6 0 6 0")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,342)
			oChart:Bars():Add("S1"):SetProperty("Color",0x1000000)
			oChart:Bars():Add("S2"):SetProperty("Color",0x2ff0000)
		oColumns := oG2antt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2"):AllowSort := .F.
		oG2antt:SingleSort := .F.
		oG2antt:AllowGroupBy := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 1/*Flat*/
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("S1"),1,"SubItem A.1")
			oItems:SetProperty("CellValue",oItems:AddItem("S1"),1,"SubItem A.1")
			oItems:SetProperty("CellValue",oItems:AddItem("S2"),1,"SubItem B.1")
			oItems:SetProperty("CellValue",oItems:AddItem("S2"),1,"SubItem B.1")
		oG2antt:Layout := "MultipleSort = " + CHR(34) + "C0:2" + CHR(34) + ""
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2196
How can I specify the cell's outline, border or lines around, when the cell gets selected

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}")
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHIMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqOp6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYnjUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" +;
		"YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=")
			oAppearance:Add(2,"CP:1 -4 0 0 0")
		oG2antt:SetProperty("SelBackColor",0x2000000)
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oG2antt:FullRowSelect := 0/*exColumnSel*/
		oG2antt:ShowFocusRect := .F.
		oG2antt:DefaultItemHeight := 24
		oG2antt:HeaderHeight := 24
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:Columns():Add("C1")
		oG2antt:Columns():Add("C2")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Cell 1"),1,"Cell 2")
			oItems:SetProperty("CellValue",oItems:AddItem("Cell 3"),1,"Cell 4")
		oG2antt:Items():SelectPos := 1
		oG2antt:SelectColumnIndex := 1
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2195
How can I specify the cell's outline, border or lines around, when the item gets selected

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}")
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHIMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqOp6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYnjUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" +;
		"YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=")
		oG2antt:SetProperty("SelBackColor",0x1000000)
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oG2antt:ShowFocusRect := .F.
		oG2antt:DefaultItemHeight := 24
		oG2antt:HeaderHeight := 24
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:Columns():Add("C1")
		oG2antt:Columns():Add("C2")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Cell 1"),1,"Cell 2")
			oItems:SetProperty("CellValue",oItems:AddItem("Cell 3"),1,"Cell 4")
			oItems:SelectPos := 1
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2194
How can I specify the cell's outline, border or lines around

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}")
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHIMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqOp6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYnjUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" +;
		"YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=")
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:ShowFocusRect := .F.
		oG2antt:DefaultItemHeight := 24
		oG2antt:HeaderHeight := 24
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:Columns():Add("C1")
		oG2antt:Columns():Add("C2")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Cell 1"),1,"Cell 2")
			h := oItems:AddItem("Cell 2")
			oItems:SetProperty("CellValue",h,1,"Cell 3")
			oItems:SetProperty("CellBackColor",h,1,0x1000000)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2193
Is it possible to highligth the match while a filter is applied

PROCEDURE OnAddColumn(oG2antt,Column)
	/*Column.Def(17) = 1*/

RETURN

PROCEDURE OnFilterChange(oG2antt)
	LOCAL format
	format := oG2antt:FormatABC("`value replace '` + value + `' with '<bgcolor 000000><fgcolor FFFFFF>` + value  + `</fgcolor></bgcolor>'`",oG2antt:FilterBarPromptPattern())
	oG2antt:Columns:Item(0):FormatColumn := Transform(format,"")
	oG2antt:Columns:Item(1):FormatColumn := Transform(format,"")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddColumn := {|Column| OnAddColumn(oG2antt,Column)} /*Fired after a new column has been added.*/
		oG2antt:FilterChange := {|| OnFilterChange(oG2antt)} /*Occurs when the filter was changed.*/

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:Columns():Add("Col 1")
		oG2antt:Columns():Add("Col 2")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("219 Smith"),1,"Ignacio 1234")
			oItems:SetProperty("CellValue",oItems:AddItem("1666 County Road 309A"),1,"897 Manassa")
			oItems:SetProperty("CellValue",oItems:AddItem("38 Lone Pine"),1,"Durango 11")
			oItems:SetProperty("CellValue",oItems:AddItem("612 Jachim Street"),1,"Lamar 222")
		oG2antt:FilterBarPromptPattern := "1"
		oG2antt:FilterBarPromptVisible := 2067/*exFilterBarCompact+exFilterBarSingleLine+exFilterBarVisible+exFilterBarPromptVisible*/
		oG2antt:FilterBarPromptType := 257/*exFilterPromptCaseSensitive+exFilterPromptContainsAll*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2192
How can I display the total/sum/aggregate in the same column, when the user groups by a column

PROCEDURE OnAddColumn(oG2antt,Column)

RETURN

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemDivider",Item,-1)
		oItems:SetProperty("ItemBackColor",Item,oG2antt:BackColorSortBar())
		oItems:SetProperty("ItemHeight",Item,oG2antt:HeaderHeight())
		oItems:SetProperty("CellMerge",Item,0,"1,2,3,4,5,7,8,9,10,11,12")
		oItems:SetProperty("CellValue",Item,13,"count(current,rec,1)")
		oItems:SetProperty("CellValueFormat",Item,13,5/*exTotalField+exHTML*/)
		oItems:SetProperty("CellValue",Item,0,oItems:CellCaption(Item,oItems:GroupItem(Item)))
		oItems:SetProperty("FormatCell",Item,0,"`<b>` + value + `</b> <font ;7><off 3><fgcolor=808080>(` + %13 +  `)`")
		oItems:SetProperty("CellValue",Item,6,"sum(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,6,5/*exTotalField+exHTML*/)
		oItems:SetProperty("CellForeColor",Item,6,AutomationTranslateColor( GraMakeRGBColor  ( { 102,102,102 } )  , .F. ))
RETURN

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL hL
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddColumn := {|Column| OnAddColumn(oG2antt,Column)} /*Fired after a new column has been added.*/
		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := 5/*exGroupLinesOutside*/
		oG2antt:Indent := 12
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColorSortBar",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:AutoDrag := 16/*exAutoDragScroll*/
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SingleSort := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:AllowGroupBy := .T.
		oG2antt:HeaderHeight := 24
		oColumns := oG2antt:Columns()
			oColumns:Add("Count"):Visible := .F.
			oColumn := oColumns:Item("Freight")
				oColumn:SetProperty("Def",4/*exCellBackColor*/,oG2antt:BackColorSortBar())
				oColumn:SetProperty("Def",7/*exHeaderBackColor*/,oColumn:Def(4/*exCellBackColor*/))
				oColumn:SetProperty("Def",49/*exCellPaddingRight*/,4)
				oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,4)
				oColumn:HeaderBold := .T.
				oColumn:AllowGroupBy := .F.
				oColumn:FormatColumn := "value format ``"
				oColumn:Alignment := 2/*RightAlignment*/
			oColumn1 := oColumns:Item(0)
				oColumn1:AllowGroupBy := .F.
				oColumn1:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumns:Item("ShipCountry"):SortOrder := 1/*SortAscending*/
		oG2antt:ScrollBySingleLine := .F.
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",2/*exBottom*/,1)
			hL := oItems:LockedItem(2/*exBottom*/,0)
			oItems:SetProperty("ItemHeight",hL,24)
			oItems:SetProperty("ItemBold",hL,.T.)
			oItems:SetProperty("ItemBackColor",hL,oG2antt:BackColorSortBar())
			oItems:SetProperty("CellValue",hL,6,"sum(all,rec,dbl(%6))")
			oItems:SetProperty("CellValueFormat",hL,6,5/*exTotalField+exHTML*/)
			oItems:SetProperty("CellHAlignment",hL,6,2/*RightAlignment*/)
			oItems:SetProperty("FormatCell",hL,6,"value format ``")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2191
How do I add a total field locked at the bottom of the control

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemDividerLine",Item,0/*EmptyLine*/)
		oItems:SetProperty("FormatCell",Item,oItems:GroupItem(Item),"value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`")
		oItems:SetProperty("CellValue",Item,"Min","min(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,"Min",4/*exTotalField*/)
		oItems:SetProperty("CellValue",Item,"Max","max(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,"Max",4/*exTotalField*/)
		oItems:SetProperty("CellValue",Item,"Sum","sum(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,"Sum",4/*exTotalField*/)
		oItems:SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
RETURN

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,var_Column,var_Column1
	LOCAL oColumns
	LOCAL oItems
	LOCAL hL
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/

		oG2antt:BeginUpdate()
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:SetProperty("Description",26/*exColumnsFloatBar*/,"Show/Hide")
		oG2antt:ColumnsFloatBarSortOrder := 1/*SortAscending*/
		oG2antt:ColumnsFloatBarVisible := 2/*exColumnsFloatBarVisibleIncludeCheckColumns*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:SetProperty("BackColorSortBar",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SingleSort := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:AllowGroupBy := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("Min")
				oColumn:Visible := .F.
				oColumn:AllowDragging := .F.
			var_Column := oColumns:Add("Max")
				var_Column:Visible := .F.
				var_Column:Visible := .F.
				var_Column:AllowDragging := .F.
			var_Column1 := oColumns:Add("Sum")
				var_Column1:Visible := .F.
				var_Column1:Visible := .F.
				var_Column1:AllowDragging := .F.
		oColumn1 := oG2antt:Columns:Item("Freight")
			oColumn1:FormatColumn := "currency(value)"
			oColumn1:SetProperty("Def",4/*exCellBackColor*/,12895487)
			oColumn1:SetProperty("Def",7/*exHeaderBackColor*/,oColumn1:Def(4/*exCellBackColor*/))
			oColumn1:HeaderBold := .T.
			oColumn1:AllowGroupBy := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
		oG2antt:ScrollBySingleLine := .F.
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",2/*exBottom*/,2)
			hL := oItems:LockedItem(2/*exBottom*/,0)
			oItems:SetProperty("ItemDivider",hL,0)
			oItems:SetProperty("ItemHeight",hL,3)
			oItems:SetProperty("ItemDividerLineAlignment",hL,2/*DividerTop*/)
			oItems:SetProperty("ItemDividerLine",hL,2/*DoubleLine*/)
			hL := oItems:LockedItem(2/*exBottom*/,1)
			oItems:SetProperty("CellValue",hL,6,"sum(all,rec,dbl(%6))")
			oItems:SetProperty("CellValueFormat",hL,6,4/*exTotalField*/)
			oItems:SetProperty("ItemHeight",hL,24)
			oItems:SetProperty("ItemBold",hL,.T.)
		oG2antt:Columns:Item("EmployeeID"):SortOrder := -1/*0xfffffffc+SortDescending+SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2190
How can I add a total field, when I use grouping

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemDividerLine",Item,0/*EmptyLine*/)
		oItems:SetProperty("FormatCell",Item,oItems:GroupItem(Item),"value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`")
		oItems:SetProperty("CellValue",Item,"Min","min(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,"Min",4/*exTotalField*/)
		oItems:SetProperty("CellValue",Item,"Max","max(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,"Max",4/*exTotalField*/)
		oItems:SetProperty("CellValue",Item,"Sum","sum(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,"Sum",4/*exTotalField*/)
		oItems:SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
RETURN

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL hL
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/

		oG2antt:BeginUpdate()
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:SetProperty("BackColorSortBar",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SingleSort := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := -1/*0xfffffffc+SortDescending+SortAscending*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Min"):Visible := .F.
			oColumns:Add("Max"):Visible := .F.
			oColumns:Add("Sum"):Visible := .F.
		oColumn := oG2antt:Columns:Item("Freight")
			oColumn:SetProperty("Def",4/*exCellBackColor*/,12895487)
			oColumn:SetProperty("Def",7/*exHeaderBackColor*/,oColumn:Def(4/*exCellBackColor*/))
			oColumn:HeaderBold := .T.
			oColumn:AllowGroupBy := .F.
		oG2antt:ScrollBySingleLine := .F.
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",2/*exBottom*/,1)
			hL := oItems:LockedItem(2/*exBottom*/,0)
			oItems:SetProperty("ItemDivider",hL,0)
			oItems:SetProperty("ItemHeight",hL,24)
			oItems:SetProperty("ItemDividerLineAlignment",hL,2/*DividerTop*/)
			oItems:SetProperty("ItemDividerLine",hL,2/*DoubleLine*/)
			oItems:SetProperty("CellValue",hL,0,"sum(all,rec,dbl(%6))")
			oItems:SetProperty("CellValueFormat",hL,0,5/*exTotalField+exHTML*/)
			oItems:SetProperty("CellHAlignment",hL,0,2/*RightAlignment*/)
			oItems:SetProperty("FormatCell",hL,0,"'Freight: <bgcolor=FFC4C4> '+(value format ``) + ` `")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2189
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeCheckColumns

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .F.
		oG2antt:HeaderAppearance := 4/*Etched*/
		oColumns := oG2antt:Columns()
			oColumns:Add("City")
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oG2antt:SetProperty("Description",26/*exColumnsFloatBar*/,"Show/Hide")
		oG2antt:ColumnsFloatBarSortOrder := 1/*SortAscending*/
		oG2antt:ColumnsFloatBarVisible := 2/*exColumnsFloatBarVisibleIncludeCheckColumns*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2188
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

PROCEDURE OnSort(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/
		oG2antt:Sort := {|| OnSort(oG2antt)} /*Fired when the control sorts a column.*/

		oG2antt:BeginUpdate()
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oColumn := oG2antt:Columns():Add("Position")
			oColumn:FormatColumn := "1 apos ''"
			oColumn:Visible := .F.
		oG2antt:ConditionalFormats():Add("(%C13 mod 4) = 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2187
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SingleSort := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := -1/*0xfffffffc+SortDescending+SortAscending*/
		oColumn := oG2antt:Columns():Add("Position")
			oColumn:FormatColumn := "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
			oColumn:Visible := .F.
		oG2antt:ConditionalFormats():Add("(%C13 mod 2) != 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2186
I need to display sub-totals in the grouping items. Is there any solution on this

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemDivider",Item,-1)
		oItems:SetProperty("EnableItem",Item,.F.)
		oItems:SetProperty("CellValueFormat",Item,oG2antt:TreeColumnIndex(),1/*exHTML*/)
		oItems:SetProperty("FormatCell",Item,oG2antt:TreeColumnIndex(),"%1")
		oItems:SetProperty("CellValueFormat",Item,"Freight",5/*exTotalField+exHTML*/)
		oItems:SetProperty("CellValue",Item,"Freight","sum(current,dir,%6)")
		oItems:SetProperty("FormatCell",Item,"Freight","`<b>` + currency(value)")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:SetProperty("BackColorSortBar",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oG2antt:LinesAtRoot := 5/*exGroupLinesOutside*/
		oG2antt:Columns:Item("ShipVia"):DisplayFilterButton := .T.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2185
I use a subtotal in exTop-Item, after grouping the item shows 0. What is the solution

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SingleSort := .F.
		oG2antt:AllowGroupBy := .T.
		oG2antt:SortBarVisible := .T.
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:Columns:Item(5):SortOrder := 1/*SortAscending*/
		oG2antt:Columns:Item(6):FormatColumn := "currency(value)"
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",0/*exTop*/,1)
			h := oItems:LockedItem(0/*exTop*/,0)
			oItems:SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oItems:SetProperty("CellBackColor",h,6,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
			oItems:SetProperty("CellValue",h,6,"sum(all,rec,%6)")
			oItems:SetProperty("CellValueFormat",h,6,4/*exTotalField*/)
		oG2antt:Refresh()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2184
How can I add multiple values/columns on the same line/item/row

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/

		oG2antt:BeginUpdate()
		oG2antt:SortOnClick := 0/*exNoSort*/
		oG2antt:LinesAtRoot := 5/*exGroupLinesOutside*/
		oG2antt:Indent := 13
		oG2antt:HeaderVisible := 0/*exHeaderHidden*/
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Items")
			oColumns:Add("Quantity"):Editor():EditType := 4/*SpinType*/
			oColumns:Add("Value"):Editor():EditType := 4/*SpinType*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Items")
			oItems:SetProperty("CellValue",h,2,"sum(current,dir,dbl(%1)*dbl(%2))")
			oItems:SetProperty("CellValueFormat",h,2,4/*exTotalField*/)
			oItems:SetProperty("FormatCell",h,2,"`Total: `+ value")
			oItems:SetProperty("CellHAlignment",h,2,2/*RightAlignment*/)
			oItems:SetProperty("CellBold",h,2,.T.)
			oItems:SetProperty("CellEditorVisible",h,2,0/*exEditorHidden*/)
			oItems:SetProperty("CellEditorVisible",h,1,0/*exEditorHidden*/)
			h1 := oItems:InsertItem(h,,"Item 1")
			oItems:SetProperty("CellValue",h1,1,10)
			oItems:SetProperty("CellValue",h1,2,3)
			h1 := oItems:InsertItem(h,,"Item 2")
			oItems:SetProperty("CellValue",h1,1,20)
			oItems:SetProperty("CellValue",h1,2,4)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2183
Is it possible, to add more aggregate functions to grouping header

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("FormatCell",Item,oItems:GroupItem(Item),"value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`")
		oItems:SetProperty("CellValue",Item,"Min","min(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,"Min",4/*exTotalField*/)
		oItems:SetProperty("CellValue",Item,"Max","max(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,"Max",4/*exTotalField*/)
		oItems:SetProperty("CellValue",Item,"Sum","sum(current,all,dbl(%6))")
		oItems:SetProperty("CellValueFormat",Item,"Sum",4/*exTotalField*/)
RETURN

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/

		oG2antt:BeginUpdate()
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SingleSort := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := -1/*0xfffffffc+SortDescending+SortAscending*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Min"):Visible := .F.
			oColumns:Add("Max"):Visible := .F.
			oColumns:Add("Sum"):Visible := .F.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2182
Is it possible to display more aggregate functions to a single cell (method 2)

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/

		oG2antt:BeginUpdate()
		oG2antt:SortOnClick := 0/*exNoSort*/
		oG2antt:LinesAtRoot := 5/*exGroupLinesOutside*/
		oG2antt:Indent := 13
		oG2antt:HeaderVisible := 0/*exHeaderHidden*/
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Items")
			oColumns:Add("Quantity"):Editor():EditType := 4/*SpinType*/
			oColumns:Add("Sum"):Visible := .F.
			oColumns:Add("Min"):Visible := .F.
			oColumns:Add("Max"):Visible := .F.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Items")
			oItems:SetProperty("CellMerge",h,0,1)
			oItems:SetProperty("FormatCell",h,0,"`Items, <b>sum(` + %2 + `), min(` + %3 + `), max(` + %4 + `)</b>`")
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellValue",h,2,"sum(current,dir,dbl(%1))")
			oItems:SetProperty("CellValueFormat",h,2,4/*exTotalField*/)
			oItems:SetProperty("CellValue",h,3,"min(current,dir,dbl(%1))")
			oItems:SetProperty("CellValueFormat",h,3,4/*exTotalField*/)
			oItems:SetProperty("CellValue",h,4,"max(current,dir,dbl(%1))")
			oItems:SetProperty("CellValueFormat",h,4,4/*exTotalField*/)
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Item 1"),1,10)
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Item 2"),1,20)
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Item 3"),1,30)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2181
How can I use the current in the aggregate/total field

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/

		oG2antt:BeginUpdate()
		oG2antt:SortOnClick := 0/*exNoSort*/
		oG2antt:LinesAtRoot := 5/*exGroupLinesOutside*/
		oG2antt:Indent := 13
		oG2antt:HeaderVisible := 0/*exHeaderHidden*/
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Items")
			oColumns:Add("Quantity"):Editor():EditType := 4/*SpinType*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Items")
			oItems:SetProperty("CellValue",h,1,"sum(current,dir,dbl(%1))")
			oItems:SetProperty("CellValueFormat",h,1,4/*exTotalField*/)
			oItems:SetProperty("FormatCell",h,1,"`Total: `+ value")
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Item 1"),1,10)
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Item 2"),1,20)
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Item 3"),1,30)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2180
The CellValue/CellCaption property gets the result of a computed/total field with text formatting. Is it possible to get that value without text formatting

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("A"):Editor():EditType := 4/*SpinType*/
		oG2antt:Columns():Add("B"):Editor():EditType := 4/*SpinType*/
		oG2antt:Columns():Add("A+B")
		oItems := oG2antt:Items()
			h := oItems:AddItem(10)
			oItems:SetProperty("CellValue",h,1,20)
			oItems:SetProperty("CellValueFormat",h,2,2/*exComputedField*/)
			oItems:SetProperty("CellValue",h,2,"currency(dbl(%0)+dbl(%1))")
			DevOut( "CellCaption returns " )
			DevOut( oItems:CellCaption(h,2) )
			DevOut( "CellValue returns " )
			DevOut( Transform(oItems:CellValue(h,2),"") )
			DevOut( "ComputeValue returns " )
			DevOut( Transform(oItems:ComputeValue("dbl(%0)+dbl(%1)",h,0,oItems:CellValueFormat(h,2)),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2179
Can I get the result of a specified formula as your control does using the ComputedField property
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("A")
		oG2antt:Columns():Add("B")
		oItems := oG2antt:Items()
			h := oItems:AddItem(10)
			oItems:SetProperty("CellValue",h,1,20)
			DevOut( "A+B is " )
			DevOut( Transform(oItems:ComputeValue("dbl(%0)+dbl(%1)",h,0,2),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2178
Is it possible to get the text without HTML formatting
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("")
		oItems := oG2antt:Items()
			h := oItems:AddItem("<b>bold</b>")
			DevOut( Transform(oItems:ComputeValue(oItems:CellValue(h,0),h,0,1),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2177
Transparent/Border SummaryBar

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemDividerLine",Item,0/*EmptyLine*/)
		oItems:AddBar(Item,"Summary","12/02/2017","12/02/2017")
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/10/2017")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABHEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKMIziaQJiYLBIaRgEUTRXASCQxDBKQBSeKkRRtDaOYDnGQYDiCIouQLEIxDKItBSJCKURJkAZZHjeToSR5PMb0dKdAw5I6raShEaaIiqJIXP7Fc7QSA0EgTBIFajgOpQAb+bptW7FVDULTMQS5FCZKasOA7FgOZ4DWjUVpwTZ1Q4LC65bjuaraawKbYbXrFYJQSA8EwjNjDcLuKqcKpvDJsSJIFKxOB2KYtBLMLbzLR5apjLZ0QLSOKRDoMEgRDYGdKjLScGrGao8ABtcBlAZJRjoOo5DJgeCQapUQhNczGQzQSIiBOJZAFSQwRHcJhGh2BZvngMIeA8H4TksA5ylgZBeg8X4GmGX4nniPazneQ5VnKdp9H8P4vD+X57nMRofmgBZ4FgIAoBWdoBGAGAeAgfxfjgNZ1DqWxEA0ASAgA==")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
			oBar := oChart:Bars:Item("Summary")
				oBar:SetProperty("Color",0x1000000)
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%513%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Def",58/*exBarCaptionHOffset*/,8)
			oBar1 := oChart:Bars:Item("Task")
				oBar1:Pattern := 32/*exPatternBox*/
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oColumns := oG2antt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumn := oColumns:Add("Pos")
				oColumn:FormatColumn := "1 pos ``"
				oColumn:AllowGroupBy := .F.
				oColumn:Position := 0
				oColumn:Width := 48
				oColumn:AllowSizing := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:AllowGroupBy := .T.
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:HeaderAppearance := 4/*Etched*/
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"SubItem A.1")
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"SubItem A.2")
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"SubItem A.3")
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"SubItem A.4")
			oItems:SetProperty("CellValue",oItems:AddItem("Item B"),1,"SubItem B.1")
			oItems:SetProperty("CellValue",oItems:AddItem("Item B"),1,"SubItem B.2")
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2176
The bar's caption is very difficult to read if any pattern than exPatternSolid is used. Is there any way of displaying the bar's caption (except for displaying the caption outside the bar)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Font():Size := 12
		oG2antt:DefaultItemHeight := 24
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:Height := 21
				oBar:Pattern := 7/*exPatternDiagCross*/
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:UnitWidth := 24
		oItems := oG2antt:Items()
			h := oItems:AddItem("")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","")
			oItems:SetProperty("ItemBar",h,"",3/*exBarCaption*/,"to do")
			h := oItems:AddItem("bgcolor")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","")
			oItems:SetProperty("ItemBar",h,"",3/*exBarCaption*/,"<bgcolor=FFFFFF> to do </bgcolor>")
			h := oItems:AddItem("fgcolor")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","")
			oItems:SetProperty("ItemBar",h,"",3/*exBarCaption*/,"<fgcolor=FFFFFF> to do </fgcolor>")
			h := oItems:AddItem("sha")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","")
			oItems:SetProperty("ItemBar",h,"",3/*exBarCaption*/,"<sha FFFFFF;2;2> to do </sha>")
			h := oItems:AddItem("out")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","")
			oItems:SetProperty("ItemBar",h,"",3/*exBarCaption*/,"<out 000000><fgcolor=FFFFFF>to do</fgcolor></out></font>")
			h := oItems:AddItem("gra")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","")
			oItems:SetProperty("ItemBar",h,"",3/*exBarCaption*/,"<fgcolor FFFFFF><gra 000000;1;1>to do</fgcolor>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2175
How can I change the position of the bar's tooltip

PROCEDURE OnToolTip(oG2antt,Item,ColIndex,Visible,X,Y,CX,CY)
	DevOut( "ToolTip" )
	DevOut( Transform(Item,"") )
	DevOut( Transform(ColIndex,"") )
	DevOut( Transform(Visible,"") )
	DevOut( Transform(X,"") )
	DevOut( Transform(Y,"") )
	DevOut( Transform(CX,"") )
	DevOut( Transform(CY,"") )
	X := oG2antt:FormatABC("value + 8",X)
	Y := oG2antt:FormatABC("value - 8",Y)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ToolTip := {|Item,ColIndex,Visible,X,Y,CX,CY| OnToolTip(oG2antt,Item,ColIndex,Visible,X,Y,CX,CY)} /*Fired when the control prepares the object's tooltip.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>")
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Tasks A"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Tasks B"),"Task","01/03/2001","01/08/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2174
How can I replace the cell's context menu ( while edit mode is running )

PROCEDURE OnRClick(oG2antt)
	LOCAL oExContextMenu
	DevOut( "Edit Mode: " )
	DevOut( Transform(oG2antt:Editing(),"") )
	oExContextMenu := CreateObject("Exontrol.ContextMenu")
		oExContextMenu:Items():ToString := "Check[chk],[sep],Item 1,Item 2,Item 3,Popup(A,B,C)"
		DevOut( Transform(oExContextMenu:Select(),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:RClick := {|| OnRClick(oG2antt)} /*Fired when right mouse button is clicked*/

		oG2antt:BeginUpdate()
		oG2antt:HeaderAppearance := 1/*Flat*/
		oEditor := oG2antt:Columns():Add("Column"):Editor()
			oEditor:EditType := 1/*EditType*/
			oEditor:SetProperty("Option",202/*exEditAllowContextMenu*/,.F.)
		oItems := oG2antt:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2173
Is it possible to highlight the column's header once a filter is applied (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABO8GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwQgmNYDSBMcbwSAsXRYFocJ5gOT6AjKBA2UclEZpajiTY3ABUEgUS5oOBIACqariaQJAAiCRQGiYZyHKaRSwPBKFYDIIjbJheTIDChNVxUcDENQjJqLBIDRzbarye59YBfeBXdgmA4LQbDMRwNgMMQTDqKYbkOQZHbeGKAWTMEZzJj8cxTEqIaBhGTLfojSZMS7UGK1LLtMyHI6kP7sOiLfi2W4/W7XV72F79TzXIa2ZBuO57bhnAZ/VzGNj4PRNezfRqicjsGxcZwXg+TpQj0ew6gSOw7wSbozjsfYXi8PwMnSc52leHotl+MxjmoXh2nybxOH+SQtnYXx+D2P4vGMB56hQf5PCgBYeDwYBCEo1xggebgKH6IIDBYBgkiAQ5FgYPAhEIRgWGq" +;
		"DBoC4GoCiGCBYhGBQPAWdIQp0eIUiWCZigiJgqgqYpIioJQhmIMhBH0NxjEMag2g2Y4ImYOoOmOSJeDQNxXlOLR3ECUAQICA=")
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABgsHQAAYAQGKIcBiAKBQAGaAoDDYNwwQwAAxDAKcEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUgxWCEExrAaQJjjeCQFi6LAtDhPMByfQEZQIGyjkgjNLUcSbG4AKgkCiXfpUAJVP7FcgSABEEigNIxToOU4jFgeCYLQKQRK2RC9GQGFCbLhpYKIahGTYWVheN5XXblez9P7ABQwKCcAwXBp7YIKAT4XBIdYdQ7IL4xGA0AJPFoJC7mOQ5XiYAIBAZ/RL0LCcbxHHafVboQj6JouD5PUDVNY1XBdPynI6CbLhWy6Dq4UZzPwzeBifSHfDjRoJcCZe71KY3GwSEboNA6Kp+QBHAmZoZjSPYIEiF47lOLJVnuYofBwJJHmaQoYj0MIRHeM4/m6cJ8B+fpBHQJ5SGKPYYH8OYMk+P5Bn4fxaAYZAvEIX4RgUWBGgCCAmAqApgkgNgOgMEYlGASoEkQeBWBa" +;
		"BZhggZgagaYRoEwShWA6NZZAMQBAICA==")
		oG2antt:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1000000)
		oG2antt:SetProperty("Background",41/*exHeaderFilterBarActive*/,0x2000000)
		oG2antt:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oG2antt:HeaderHeight := 28
		oG2antt:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oColumns := oG2antt:Columns()
			oColumns:Add("C1"):DisplayFilterButton := .T.
			oColumn := oColumns:Add("C2")
				oColumn:DisplayFilterButton := .T.
				oColumn:Filter := "Item 2"
				oColumn:FilterType := 240/*exFilter*/
			oColumns:Add("C3"):DisplayFilterButton := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("CellValue",h,1,"Item 2")
			oItems:SetProperty("CellValue",h,2,"Item 3")
			h := oItems:AddItem("Item 4")
			oItems:SetProperty("CellValue",h,1,"Item 5")
			oItems:SetProperty("CellValue",h,2,"Item 6")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2172
How can I make the expand/collapse glyphs DPI aware

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oItems
	LOCAL h,size

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		size := 2
		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(3,"gBFLBCJwBAEHhEJAAEhEGAUHQAAYAQGKIcBiAKBQAGaAoDDYOA4QwAAxDAKcEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBRfIUEghGyNZjgNzQcCQAI8T5IUgARBJIDSMY6DpOIxYHgmC4DEITNLxOK0EhRHCBZrgOCAYhqEY1Ro+dhPFYjVTMdK0LRtKy7Mq2aJmOpZDxWE7dZKpO5fbxXS67cr2fp/YBed4rfa7KTlOBKcRQRBEFQPDqPZBkORZHh2FoLRJKbgtHJmHYNQWhVyYBbNCyTI6lahpeuHBx1QaWWxjbCMEr6bpoWLbFi3Ha1UzrPa8b5vSw7Gr+HzYQTHGPXGqaYJdZrnea6B7+U5XUJrnSOZciYHwhAeR5HDK+JVGqKRRmScx5HyfRei+H5bmmcp4Fi8o/CGGJKGQKZUGoFQigUPIiCeSZXnyHB6l0SAJn8JxfkIeZ5CgXxjCCAhyB8QgIlAM4MlKAIcCaIBIGY" +;
		"GoGGEYhqBMMxgnICgRDUDQjESGwmAkWBuCqBoiHIVgkDQYgYESWg2E0YhohcJQigITg3CQSRyEyEYGGOWJwhQJD4FiFIMk0aJFGsIBkkOBJeDc+AchYJwJgIWhSgYZQpFIVoVGOGQ4l2EwIBWMhgDmDhThCEwkAiaJchKDhjhgZhsCUY4iFCEoZkiaYQmSGAWhWQhgDuDpTjCDQiEgchAg0IpJBoDoFiEKBqCaCAimgIguH8IZnkPUhcBcJg+hGJZnloYJsiaKZKGa24YnWSR0CkKhCA2CxlCqColhAYpqEKER0DqVZ0A0ASAgA==")
			oAppearance:Add(4,"gBFLBCJwBAEHhEJAAEhABAQCg6AADACAxRDgMQBQKAAzQFAYbBwHCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACjeQYJBCNYbTJAbqhYIgAR3HqQZABCCSQKkYx0HScRiwPBMFwGIQmaaicZoJCiN4DTZAcIBRDUIxpDR9bBeKw3KqVaZnWhaNpWXZlTzKdSxXisF67RZSdi/XgvF5XXblez9P69LwXe5mUrGbyVYghCCIKgeG4dR7IMhyLDcKQXCCVW7aGSsOwbAqAXpdGAXTQdDyLJKnaZqOi6BjjA4rNbHGIYJb1XTRMa1LJuG5LJrOeZ3Xre4BLfh1VoFRpjWIYNY1QS7TLOczzfRdDxTiGVpkjCeJoD4Ng1hSRxiisVRKg8D4PkWZJznmPQ+F8Xx5guWpjHGWYMiYQodEaIRSCgU5KCSeh3naHB/iAAh9n8fwfgIeZ1CgXwjCCAhxl8AgIlAM4MlKAIcCaD54FY" +;
		"FoFmGCBmBaBIJigPJNgKSAoDSVC+BIbIYCUYYoiYKoJgkWIMlGCAglMaJZDWCYiFyFIJkkOJYhEJc7G4PYPCOaJshQJBjgiVIUgyDRokEaggGSQ4El4N1CBiFgnAmAhaFKFZlFkShUhWJRYmITg3GSQgFGuGBOGOFJkCSSQCDoNgkiOCY0hUJJmmmQhvhqZtYmUOQmBWIRvhgTpjjSbAjEiEgchBZgyEaBIhigWgegqIhIjoDILiACB5nTL5WnWRYOiSKYJnqGQ7CmOh2hqJ5OkYORxFyShKhSAxihkOomioY5YiqFIkFyTo1HkAxAEAgIA==")
			oAppearance:Add(1,oG2antt:FormatABC("`CP:3 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)",size))
			oAppearance:Add(2,oG2antt:FormatABC("`CP:4 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)",size))
		oG2antt:LinesAtRoot := 1/*exGroupLinesAtRoot*/
		oG2antt:HasButtons := 4/*exCustom*/
		oG2antt:SetProperty("HasButtonsCustom",.F.,16777216)
		oG2antt:SetProperty("HasButtonsCustom",.T.,33554432)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2171
Is it possible to highlight the column's header once a filter is applied (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YNYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" +;
		"bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWBMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=")
			oAppearance:Add(1,"CP:2 -8 -4 2 4")
		oG2antt:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1fefefe)
		oG2antt:SetProperty("Background",41/*exHeaderFilterBarActive*/,0x1010101)
		oG2antt:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oG2antt:HeaderHeight := 28
		oG2antt:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oColumns := oG2antt:Columns()
			oColumns:Add("C1"):DisplayFilterButton := .T.
			oColumn := oColumns:Add("C2")
				oColumn:DisplayFilterButton := .T.
				oColumn:Filter := "Item 2"
				oColumn:FilterType := 240/*exFilter*/
			oColumns:Add("C3"):DisplayFilterButton := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("CellValue",h,1,"Item 2")
			oItems:SetProperty("CellValue",h,2,"Item 3")
			h := oItems:AddItem("Item 4")
			oItems:SetProperty("CellValue",h,1,"Item 5")
			oItems:SetProperty("CellValue",h,2,"Item 6")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2170
How do I update itemcount and matchitemcount of the FilterBarCaption after I added the item using the AddItem method
PROCEDURE OnClick(oG2antt)
	oG2antt:Items():AddItem("new")
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oG2antt:Columns():Add("Item")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Pos")
			oColumn1:AllowSizing := .F.
			oColumn1:AllowSort := .F.
			oColumn1:Width := 32
			oColumn1:FormatColumn := "1 apos ``"
			oColumn1:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarCaption := "`<r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )"
		oG2antt:FilterBarPromptVisible := 3591/*exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2169
The Edit method does not work while ReadOnly property is exLocked and the first column is hidden. Is there any fix

PROCEDURE OnDblClick(oG2antt,Shift,X,Y)
	LOCAL var_ItemFromPoint
	var_ItemFromPoint := oG2antt:ItemFromPoint(-1,-1,c,hit)
	oG2antt:FocusColumnIndex := c
	oG2antt:Edit()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DblClick := {|Shift,X,Y| OnDblClick(oG2antt,Shift,X,Y)} /*Occurs when the user dblclk the left mouse button over an object.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:AutoEdit := .F.
		oG2antt:ReadOnly := 1/*exLocked*/
		oG2antt:AutoSearch := .T.
		oG2antt:Columns():Add(""):Visible := .F.
		oColumn := oG2antt:Columns():Add("Contains")
			oColumn:AutoSearch := 1/*exContains*/
			oColumn:Editor():EditType := 1/*EditType*/
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(),1,"Tom Hanks")
			oItems:SetProperty("CellValue",oItems:AddItem(),1,"Leonardo DiCaprio")
			oItems:SetProperty("CellValue",oItems:AddItem(),1,"Will Smith")
			oItems:SetProperty("CellValue",oItems:AddItem(),1,"Tom Cruise")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2168
How can I highlight the cell's button with a different appearance, when cursor hovers it

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:DefaultItemHeight := 22
		oG2antt:TreeColumnIndex := -1
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oG2antt:SetProperty("SelBackColor",oG2antt:BackColor())
		oG2antt:SetProperty("Background",157/*exCursorHoverCellButton*/,0x1000000)
		oColumn := oG2antt:Columns():Add("Buttons")
			oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.)
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:Alignment := 1/*CenterAlignment*/
			oColumn:HeaderAlignment := 1/*CenterAlignment*/
		oItems := oG2antt:Items()
			oItems:AddItem("Button <b>1</b>")
			oItems:AddItem("Button <b>2</b>")
			oItems:AddItem("Button <b>3</b>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2167
How to group one or more operations into a block when the user do undo or redo

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oNote
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:AllowUndoRedo := .T.
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:Bars:Item("Task"):Height := 16
		oItems := oG2antt:Items()
			oItems:StartBlockUndoRedo()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/23/2005","06/27/2005","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/02/2005","")
			oItems:AddLink("L1",oItems:ItemByIndex(0),"",oItems:ItemByIndex(1),"")
			oItems:EndBlockUndoRedo()
			h := oItems:ItemByIndex(1)
		oNote := oG2antt:Chart():Notes():Add("NoteD",h,"06/26/2005","CTRL+Z (undo), CTRL+Y (redo)")
			oNote:SetProperty("PartShadow",1/*exNoteEnd*/,.F.)
			oNote:SetProperty("PartToolTip",1/*exNoteEnd*/,"Press CTRL+Z to undo <br> and then press CTRL+Y to redo")
			oNote:SetProperty("PartTransparency",1/*exNoteEnd*/,25)
			oNote:SetProperty("PartVOffset",1/*exNoteEnd*/,-2)
			oNote:SetProperty("PartBackColor",1/*exNoteEnd*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,0 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2166
I am using the Link property to customize the link, but when I press redo it (CTRL+Y) to redo it, not all properties are restored. What can be done

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL u

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:AllowUndoRedo := .T.
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:Bars:Item("Task"):Height := 16
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/23/2005","07/01/2005","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/27/2005","07/04/2005","")
			oItems:StartBlockUndoRedo()
			oItems:AddLink("L1",oItems:ItemByIndex(0),"",oItems:ItemByIndex(1),"")
			u := oItems:StartUpdateLink("L1")
			oItems:SetProperty("Link","L1",10/*exLinkWidth*/,2)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"<fgcolor FF0000>CTRL+Z (undo), CTRL+Y (redo)")
			oItems:SetProperty("Link","L1",13/*exLinkToolTip*/,"Press CTRL+Z to undo <br> and then press CTRL+Y to redo")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,0)
			oItems:SetProperty("Link","L1",8/*exLinkColor*/,255)
			oItems:EndUpdateLink(u)
			oItems:EndBlockUndoRedo()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2165
I am using the ItemBar property to customize the task, but when I press redo it (CTRL+Y) to redo it, not all properties are restored. What can be done

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h,u

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:AllowUndoRedo := .T.
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:Bars:Item("Task"):Height := 16
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/30/2005","")
			h := oItems:AddItem("Task 2")
			oItems:StartBlockUndoRedo()
			oItems:AddBar(h,"Task","06/27/2005","07/04/2005","","CTRL+Z (undo), CTRL+Y (redo)")
			u := oItems:StartUpdateBar(h,"")
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,255)
			oItems:SetProperty("ItemBar",h,"",6/*exBarToolTip*/,"Press CTRL+Z to undo <br> and then press CTRL+Y to redo")
			oItems:EndUpdateBar(u)
			oItems:EndBlockUndoRedo()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2164
The incremental search feature is no working for columns with editor assigned. What can be done

PROCEDURE OnDblClick(oG2antt,Shift,X,Y)
	oG2antt:Edit()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DblClick := {|Shift,X,Y| OnDblClick(oG2antt,Shift,X,Y)} /*Occurs when the user dblclk the left mouse button over an object.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:AutoEdit := .F.
		oG2antt:AutoSearch := .T.
		oColumn := oG2antt:Columns():Add("Contains")
			oColumn:AutoSearch := 1/*exContains*/
			oColumn:Editor():EditType := 1/*EditType*/
		oItems := oG2antt:Items()
			oItems:AddItem("Tom Hanks")
			oItems:AddItem("Leonardo DiCaprio")
			oItems:AddItem("Will Smith")
			oItems:AddItem("Tom Cruise")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2163
Each item is representated by a key as string. Is it possible to have a drop down editor to display more information when using the item's key

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:HeaderAppearance := 4/*Etched*/
		oEditor := oG2antt:Columns():Add("Multiple-Columns Tree DropDownListType"):Editor()
			oEditor:EditType := 3/*DropDownListType*/
			oEditor:AddItem(0,"KR|Korea, Republic of")
			oEditor:AddItem(1,"MO|Macao")
			oEditor:AddItem(2,"SA|Saudi Arabia")
			oEditor:AddItem(3,"EG|Egypt")
			oEditor:AddItem(4,"GB|United Kingdom")
			oEditor:AddItem(5,"GT|Guatemala")
			oEditor:AddItem(6,"SR|Suriname")
			oEditor:AddItem(7,"BM|Bermuda")
		oItems := oG2antt:Items()
			oItems:AddItem("EG")
			oItems:AddItem("GB")
			oItems:AddItem("BM")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2162
My table includes codes/keys for items, can I display a drop down editor to include more information

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:HeaderAppearance := 4/*Etched*/
		oEditor := oG2antt:Columns():Add("Multiple-Columns DropDownListType"):Editor()
			oEditor:EditType := 3/*DropDownListType*/
			oEditor:DropDownAutoWidth := 0/*exDropDownEditorWidth*/
			oEditor:SetProperty("Option",57/*exDropDownColumnCaption*/,"City¦Coordinates¦State")
			oEditor:AddItem(0,"JV3|Jollyville¦3026N 09746W¦Texas")
			oEditor:AddItem(1,"TMO|Altamont¦4021N 11017W¦Utah")
			oEditor:AddItem(2,"IIM|Williamston¦4241N 08417W¦Michigan")
			oEditor:AddItem(3,"IWN|Merrittstown¦3958N 07952W¦Pennsylvania")
			oEditor:AddItem(4,"HOU|Houston¦2945N 09521W¦Texas")
			oEditor:AddItem(5,"GSF|Gales Ferry¦4125N 07205W¦Connecticut")
		oItems := oG2antt:Items()
			oItems:AddItem("HOU")
			oItems:AddItem("IIM")
			oItems:AddItem("TMO")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2161
How can I display and select from a multiple-columns tree editor

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oG2antt:HeaderAppearance := 4/*Etched*/
		oEditor := oG2antt:Columns():Add("Multiple-Columns Tree DropDownListType"):Editor()
			oEditor:EditType := 3/*DropDownListType*/
			oEditor:DropDownAutoWidth := 0/*exDropDownEditorWidth*/
			oEditor:SetProperty("Option",57/*exDropDownColumnCaption*/,"Name¦Title¦City¦Phone")
			oEditor:SetProperty("Option",58/*exDropDownColumnWidth*/,"224¦¦¦96")
			oEditor:AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1)
			oEditor:AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2)
			oEditor:InsertItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3,2)
			oEditor:InsertItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3,2)
			oEditor:InsertItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2,2)
			oEditor:InsertItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1,5)
			oEditor:InsertItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2,2)
			oEditor:InsertItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3,2)
			oEditor:InsertItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2,5)
			oEditor:ExpandAll()
		oItems := oG2antt:Items()
			oItems:AddItem(1)
			oItems:AddItem(2)
			oItems:AddItem(4)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2160
Does you control support multiple-columns for a drop down editor

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:HeaderAppearance := 4/*Etched*/
		oEditor := oG2antt:Columns():Add("Multiple-Columns DropDownListType"):Editor()
			oEditor:EditType := 3/*DropDownListType*/
			oEditor:DropDownAutoWidth := 0/*exDropDownEditorWidth*/
			oEditor:AddItem(0,"Jollyville¦JV3¦3026N 09746W¦TX")
			oEditor:AddItem(1,"Altamont¦TMO¦4021N 11017W¦UT")
			oEditor:AddItem(2,"Williamston¦IIM¦4241N 08417W¦MI")
			oEditor:AddItem(3,"Merrittstown¦IWN¦3958N 07952W¦PA")
			oEditor:AddItem(4,"Houston¦HOU¦2945N 09521W¦TX")
			oEditor:AddItem(5,"Gales Ferry¦GSF¦4125N 07205W¦CT")
		oItems := oG2antt:Items()
			oItems:InsertItem(0,"",1)
			oItems:InsertItem(0,"",2)
			oItems:InsertItem(0,"",4)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2159
Is it possible to change the summary-bar's start or/and end margins

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL h1,hR1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:LinesAtRoot := 5/*exGroupLinesOutside*/
		oG2antt:ColumnAutoResize := .F.
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:AllowLinkBars := .F.
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Members"):Width := 96
		oColumn := oG2antt:Columns():Add("Start")
			oColumn:Width := 112
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumn:LevelKey := 1
		oColumn1 := oG2antt:Columns():Add("End")
			oColumn1:Width := 112
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
			oColumn1:LevelKey := 1
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			hR1 := oItems:AddItem("Team")
			oItems:AddBar(hR1,"Summary","01/02/2008","01/08/2008","")
			oItems:AddBar(hR1,"","01/13/2008","01/13/2008","R")
			oItems:SetProperty("ItemBar",hR1,"R",19/*exBarTransparent*/,100)
			oItems:DefineSummaryBars(hR1,"",h1,"R")
			h1 := oItems:InsertItem(hR1,,"Member 1")
			oItems:AddBar(h1,"Task","01/02/2008","01/07/2008")
			oItems:DefineSummaryBars(hR1,"",h1,"")
			h1 := oItems:InsertItem(hR1,,"Member 2")
			oItems:AddBar(h1,"Task","01/04/2008","01/09/2008")
			oItems:DefineSummaryBars(hR1,"",h1,"")
			h1 := oItems:InsertItem(hR1,,"Member 3")
			oItems:AddBar(h1,"Task","01/05/2008","01/10/2008")
			oItems:DefineSummaryBars(hR1,"",h1,"")
			oItems:SetProperty("ExpandItem",hR1,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2158
I want to display two lines/curves in the histogram-area such as expected and actual work effor per month. How can I do that (leaf)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "10/05/2020"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 96
			oChart:HistogramView := 1808/*exHistogramNoGrouping+exHistogramRecLeafItems+exHistogramLeafItems+exHistogramUnlockedItems*/
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := 2048/*exRectangularCurve*/
				oBar:HistogramItems := -4
				oBar:HistogramBorderSize := 1
			oBar1 := oChart:Bars():CallMethod("Copy","Task","C")
				oBar1:HistogramPattern := 2048/*exRectangularCurve*/
				oBar1:HistogramItems := -4
				oBar1:SetProperty("HistogramColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar1:HistogramBorderSize := 2
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project A")
			oItems:AddBar(oItems:InsertItem(h,,"Item 1"),"Task","10/07/2020","10/14/2020")
			oItems:AddBar(oItems:InsertItem(h,,"Item 2"),"Task","10/10/2020","10/17/2020")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Project B")
			oItems:AddBar(oItems:InsertItem(h,,"Item 1"),"C","10/13/2020","10/20/2020")
			oItems:AddBar(oItems:InsertItem(h,,"Item 2"),"C","10/15/2020","10/23/2020")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2157
I want to display two lines/curves in the histogram-area such as expected and actual work effor per month. How can I do that (flat)

PROCEDURE OnBarResize(oG2antt,Item,Key)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBar",Item,Key,21/*exBarEffort*/,oItems:ItemBar(Item,Key,12/*exBarPercent*/))
		oItems:SetProperty("ItemBar",Item,"C",21/*exBarEffort*/,1)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResize := {|Item,Key| OnBarResize(oG2antt,Item,Key)} /*Occurs when a bar is moved or resized.*/

		oG2antt:BeginUpdate()
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "10/05/2020"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:HistogramHeight := 96
			oChart:HistogramVisible := .T.
			oBar := oChart:Bars():Add("Task%Progress")
				oBar:HistogramPattern := 2048/*exRectangularCurve*/
				oBar:HistogramItems := -4
				oBar:HistogramBorderSize := 1
				oBar:SetProperty("HistogramBorderColor",oBar:Color())
				oBar:Shortcut := "P"
				oBar:SetProperty("Def",14/*exBarShowPercentCaption*/,.T.)
			oBar1 := oChart:Bars():CallMethod("Copy","Task","C")
				oBar1:HistogramPattern := 2048/*exRectangularCurve*/
				oBar1:SetProperty("HistogramColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar1:HistogramBorderSize := 2
		oG2antt:Columns():Add("Tasks"):FormatColumn := "`Task ` + (1 index ``)"
		oItems := oG2antt:Items()
			h := oItems:AddItem()
			oItems:AddBar(h,"P","10/07/2020","10/14/2020","P")
			oItems:SetProperty("ItemBar",h,"P",12/*exBarPercent*/,0.5)
			oItems:AddBar(h,"C","10/07/2020","10/14/2020","C")
			oItems:SetProperty("ItemBar",h,"C",19/*exBarTransparent*/,100)
			oItems:GroupBars(h,"P",.T.,h,"C",.T.)
			oItems:GroupBars(h,"P",.F.,h,"C",.F.)
			h := oItems:AddItem()
			oItems:AddBar(h,"P","10/10/2020","10/17/2020","P")
			oItems:SetProperty("ItemBar",h,"P",12/*exBarPercent*/,0.75)
			oItems:AddBar(h,"C","10/10/2020","10/17/2020","C")
			oItems:SetProperty("ItemBar",h,"C",19/*exBarTransparent*/,100)
			oItems:GroupBars(h,"P",.T.,h,"C",.T.)
			oItems:GroupBars(h,"P",.F.,h,"C",.F.)
			h := oItems:AddItem()
			oItems:AddBar(h,"P","10/13/2020","10/20/2020","P")
			oItems:SetProperty("ItemBar",h,"P",12/*exBarPercent*/,0.25)
			oItems:AddBar(h,"C","10/13/2020","10/20/2020","C")
			oItems:SetProperty("ItemBar",h,"C",19/*exBarTransparent*/,100)
			oItems:GroupBars(h,"P",.T.,h,"C",.T.)
			oItems:GroupBars(h,"P",.F.,h,"C",.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2156
Is it possible to show the filterbar on top of the rows

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:FilterBarPromptVisible := 8192/*exFilterBarTop*/
		oG2antt:HeaderHeight := 24
		oG2antt:FilterBarHeight := oG2antt:HeaderHeight()
		oG2antt:HeaderAppearance := 1/*Flat*/
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/
		oColumn := oG2antt:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 3/*exPattern*/
			oColumn:Filter := "B*"
		oColumn1 := oG2antt:Columns():Add("Index")
			oColumn1:FormatColumn := "1 index ``"
			oColumn1:Position := 0
			oColumn1:Width := 48
			oColumn1:AllowSizing := .F.
			oColumn1:SortType := 1/*SortNumeric*/
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oItems := oG2antt:Items()
			oItems:AddItem("A.1")
			oItems:AddItem("A.2")
			oItems:AddItem("B.1")
			oItems:AddItem("B.2")
			oItems:AddItem("B.3")
			oItems:AddItem("C")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2155
The deadline symbol is now a white arrow and it is difficult to see. I want to create a green or black arrow for showing deadline

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,96)
			oBar := oChart:Bars:Item("Deadline")
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,128,0 } )  , .F. ))
				oBar:StartShape := 12/*exShapeIconDown3*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task"),"Deadline","01/02/2001","01/02/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2154
DragDrop (with visual effect)

PROCEDURE OnOLEDragDrop(oG2antt,Data,Effect,Button,Shift,X,Y)
	/*SelectItem(InsertItem(i,, Data.GetData(1))) = True*/
	LOCAL oItems
	LOCAL i
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	oItems := oG2antt:Items()
		oItems:SetProperty("ExpandItem",i,.T.)
RETURN

PROCEDURE OnOLEStartDrag(oG2antt,Data,AllowedEffects)
	/*Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)*/
	AllowedEffects := 1
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:OLEDragDrop := {|Data,Effect,Button,Shift,X,Y| OnOLEDragDrop(oG2antt,Data,Effect,Button,Shift,X,Y)} /*Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.*/
		oG2antt:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oG2antt,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABPUIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRjEEQDCKYcxHCaIBiGcaIfDEBIeSBHcgRbAcOQHGSZZBhGRJGjuKIbSrLICzBDUcRnGwAKQoaaaEomHwyAZOYwDAIoWhpKKCKjqWJKNb+XgAAJTES0RRVRTNAZ1YghGAQgIA==")
		oG2antt:SetProperty("Background",96/*exListOLEDropPosition*/,0x1000000)
		oG2antt:SetProperty("Background",97/*exChartOLEDropPosition*/,AutomationTranslateColor( GraMakeRGBColor  ( { 1,0,0 } )  , .F. ))
		oG2antt:SetProperty("Background",33/*exDragDropBefore*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oG2antt:SetProperty("Background",34/*exDragDropAfter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:OLEDropMode := 1/*exOLEDropManual*/
		oG2antt:AutoDrag := 196608/*exAutoDragPositionAnyOnRight*/
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Indent := 16
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		DevOut( "You can:" )
		DevOut( "A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" )
		DevOut( "B) right-click to re-arrange the item position inside the same control" )
		DevOut( "This sample shows how you can insert the data being dropped as a child of the item being hovered." )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2153
DragDrop (with no visual effect, hide item while drag and drop)

PROCEDURE OnOLEDragDrop(oG2antt,Data,Effect,Button,Shift,X,Y)
	/*SelectItem(InsertItem(i,, Data.GetData(1))) = True*/
	LOCAL oItems
	LOCAL i
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	oItems := oG2antt:Items()
		oItems:SetProperty("ExpandItem",i,.T.)
RETURN

PROCEDURE OnOLEStartDrag(oG2antt,Data,AllowedEffects)
	/*Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)*/
	AllowedEffects := 1
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:OLEDragDrop := {|Data,Effect,Button,Shift,X,Y| OnOLEDragDrop(oG2antt,Data,Effect,Button,Shift,X,Y)} /*Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.*/
		oG2antt:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oG2antt,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oG2antt:SetProperty("Background",33/*exDragDropBefore*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oG2antt:SetProperty("Background",34/*exDragDropAfter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:OLEDropMode := 1/*exOLEDropManual*/
		oG2antt:AutoDrag := 196608/*exAutoDragPositionAnyOnRight*/
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Indent := 16
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		DevOut( "You can:" )
		DevOut( "A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" )
		DevOut( "B) right-click to re-arrange the item position inside the same control" )
		DevOut( "This sample shows how you can insert the data being dropped as a child of the item being hovered." )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2152
DragDrop

PROCEDURE OnOLEDragDrop(oG2antt,Data,Effect,Button,Shift,X,Y)
	/*SelectItem(InsertItem(i,, Data.GetData(1))) = True*/
	LOCAL oItems
	LOCAL i
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	oItems := oG2antt:Items()
		oItems:SetProperty("ExpandItem",i,.T.)
RETURN

PROCEDURE OnOLEStartDrag(oG2antt,Data,AllowedEffects)
	/*Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)*/
	AllowedEffects := 1
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:OLEDragDrop := {|Data,Effect,Button,Shift,X,Y| OnOLEDragDrop(oG2antt,Data,Effect,Button,Shift,X,Y)} /*Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.*/
		oG2antt:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oG2antt,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oG2antt:OLEDropMode := 1/*exOLEDropManual*/
		oG2antt:AutoDrag := 196608/*exAutoDragPositionAnyOnRight*/
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Indent := 16
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		DevOut( "You can:" )
		DevOut( "A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" )
		DevOut( "B) right-click to re-arrange the item position inside the same control" )
		DevOut( "This sample shows how you can insert the data being dropped as a child of the item being hovered." )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2151
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header (non-clickable)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderAppearance := 4/*Etched*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Item")
			oColumn := oColumns:Add("Pos")
				oColumn:Position := 0
				oColumn:Width := 32
				oColumn:AllowSizing := .F.
				oColumn:FormatColumn := "1 index ``"
				oColumn:AllowSort := .F.
				oColumn:AllowDragging := .F.
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2150
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oColumns := oG2antt:Columns()
			oColumns:Add("Item")
			oColumn := oColumns:Add("Pos")
				oColumn:Position := 0
				oColumn:Width := 32
				oColumn:AllowSizing := .F.
				oColumn:FormatColumn := "1 index ``"
				oColumn:AllowSort := .F.
				oColumn:AllowDragging := .F.
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2149
How can I detect the last visible item
PROCEDURE OnSelectionChanged(oG2antt)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( Transform(oItems:NextVisibleItem(oItems:FocusItem()),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:SelectionChanged := {|| OnSelectionChanged(oG2antt)} /*Fired after a new item has been selected.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:AutoDrag := 3/*exAutoDragPositionAny*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:InsertItem(oItems:AddItem("Item 1"),,"Child 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:InsertItem(oItems:AddItem("Item 4"),,"Child 4")
			oItems:AddItem("Item 5")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2148
Is it possible to show the non-working part on the back (behind the item's background)

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oConditionalFormat
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oG2antt,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := 5/*exGroupLinesOutside*/
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:DefaultItemHeight := 22
		oG2antt:GridLineStyle := 48/*exGridLinesSolid*/
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABUkIQAAYAQGKIcBiAKBQAGYBIJDEMQ3DjAUBjMK4ZwTC4AIQjCK4JDKHYJRpHEZgLBMJAAGIZYhhUYRUiYMkiJBGGDIDiGGI2SJAcbTVIEcx9EyUJSgSTJOjCMokTTIU4TTLYASbJafJJhWSaAiyMouDIOMg1BDNIw/Hika6jOgKUisNJXRzWIBTbDlOQ3JqnbCjOQRSrQBoNDAMAiiaKlbwJPK9RoieQXfwUAJrXJcFqXFSLVxNBKAQEBA=")
			oAppearance:Add(4,"gBFLBCJwBAEHhEJAAEhABTcIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEiJYgGIZxYh8MQER5IEbyBDsBw5AaZZojGRJGigNIqSxLUhTRKUdQrG4AKQnGhpDgmJYnU5EcrSUKQcw/JaiKYpGZYXpqO5OTzUIyVHDdKgFGKNKwjKiKKp6FofDJcADUcKAYBKFoaLjgS5bXhSGpnV5bFoWdLTVwhBKAQEBA=")
			oAppearance:Add(1,"CP:2 1 1 -1 -1")
			oAppearance:Add(3,"CP:4 1 1 -1 -1")
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:SetProperty("BackColor",0x3000000)
			oConditionalFormat:SetProperty("ChartBackColor",oConditionalFormat:BackColor())
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 4/*exShapeSolidDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:NonworkingDaysPattern := 1/*exPatternSolid*/
			oChart:GridLineStyle := 304/*exGridLinesBehind+exGridLinesSolid*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 4")
			oItems:AddBar(hChild,"Task","08/05/2017","08/14/2017")
			hChild := oItems:InsertItem(h,,"Task 5")
			oItems:AddBar(hChild,"Task","08/06/2017","08/16/2017")
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("ItemBackColor")
			oItems:AddBar(h,"Progress","08/04/2017","08/14/2017")
			oItems:SetProperty("ItemBackColor",h,0x18080ff)
			oG2antt:Chart():SetProperty("ItemBackColor",h,0x18080ff)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2147
How can I hide a bar within the control's overview (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Default")
		oG2antt:SetProperty("Background",18/*exSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:OverviewHeight := 48
			oChart:OverviewVisible := 73730/*exOverviewSplitter+exOverviewShowMargins+exOverviewShowAllVisible*/
			oChart:FirstVisibleDate := "01/01/2020"
			oChart:Bars():CallMethod("Copy","Task","TaskO"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("")
			oItems:AddBar(h,"Task","01/02/2020","01/12/2020","K1")
			oItems:AddBar(h,"Task","12/02/2020","12/12/2020","K2")
			h := oItems:AddItem("")
			oItems:AddBar(h,"TaskO","01/02/2020","01/12/2020","K1")
			oItems:SetProperty("ItemBar",h,"K1",41/*exBarOverviewColor*/,-1)
			oItems:AddBar(h,"TaskO","12/02/2020","12/12/2020","K2")
			oItems:SetProperty("ItemBar",h,"K2",41/*exBarOverviewColor*/,-1)
			h := oItems:AddItem("")
			oItems:AddBar(h,"Task","01/02/2020","01/12/2020","K1")
			oItems:AddBar(h,"Task","12/02/2020","12/12/2020","K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2146
How can I hide all bars within the control's overview (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Default")
		oG2antt:SetProperty("Background",18/*exSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:OverviewHeight := 48
			oChart:OverviewVisible := 8705/*exOverviewShowMargins+exOverviewHideBars+exOverviewShowOnlyVisible*/
			oChart:FirstVisibleDate := "01/01/2020"
			oBar := oChart:Bars():CallMethod("Copy","Task","TaskO")
				oBar:SetProperty("OverviewColor",-1)
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("")
			oItems:AddBar(h,"Task","01/02/2020","01/12/2020","K1")
			oItems:AddBar(h,"Task","12/02/2020","12/12/2020","K2")
			h := oItems:AddItem("")
			oItems:AddBar(h,"TaskO","01/02/2020","01/12/2020","K1")
			oItems:AddBar(h,"TaskO","12/02/2020","12/12/2020","K2")
			h := oItems:AddItem("")
			oItems:AddBar(h,"Task","01/02/2020","01/12/2020","K1")
			oItems:AddBar(h,"Task","12/02/2020","12/12/2020","K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2145
How can I hide all bars or specified type within the control's overview (sample 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Default")
		oG2antt:SetProperty("Background",18/*exSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:OverviewHeight := 48
			oChart:OverviewVisible := 73730/*exOverviewSplitter+exOverviewShowMargins+exOverviewShowAllVisible*/
			oChart:FirstVisibleDate := "01/01/2020"
			oBar := oChart:Bars():CallMethod("Copy","Task","TaskO")
				oBar:SetProperty("OverviewColor",-1)
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("")
			oItems:AddBar(h,"Task","01/02/2020","01/12/2020","K1")
			oItems:AddBar(h,"Task","12/02/2020","12/12/2020","K2")
			h := oItems:AddItem("")
			oItems:AddBar(h,"TaskO","01/02/2020","01/12/2020","K1")
			oItems:AddBar(h,"TaskO","12/02/2020","12/12/2020","K2")
			h := oItems:AddItem("")
			oItems:AddBar(h,"Task","01/02/2020","01/12/2020","K1")
			oItems:AddBar(h,"Task","12/02/2020","12/12/2020","K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2144
Is it possible to exclude the parent/child items when do the filtering, so to include only items that match the filter without any indentation

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","01/02/2001","01/09/2001")
RETURN

PROCEDURE OnFilterChange(oG2antt)
	oG2antt:Indent := oG2antt:FormatABC("value > 0 ? 18 : 0",:Items:MatchItemCount())
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:FilterChange := {|| OnFilterChange(oG2antt)} /*Occurs when the filter was changed.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Indent := 18
		oG2antt:FilterInclude := 4/*exMatchingItemsOnly*/
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:HeaderAppearance := 1/*Flat*/
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,164)
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("Column")
				oColumn:DisplayFilterButton := .T.
				oColumn:FilterType := 240/*exFilter*/
				oColumn:FilterList := 256/*exShowCheckBox*/
				oColumn:Filter := "C1"
			oColumn1 := oColumns:Add("Pos")
				oColumn1:FormatColumn := "1 rindex ``"
				oColumn1:Position := 0
				oColumn1:AllowSizing := .F.
				oColumn1:AllowDragging := .F.
		oItems := oG2antt:Items()
			h := oItems:AddItem("R1")
			h2 := oItems:InsertItem(h,,"S")
			oItems:InsertItem(h2,,"C1")
			oItems:InsertItem(h2,,"C2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2143
I am using the Chart.AllowResizeChart property. How can I customize the labels into the chart's levels
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/
			oChart:SetProperty("Label",0/*exYear*/,"year")
			oChart:SetProperty("Label",1/*exHalfYear*/,"")
			oChart:SetProperty("Label",2/*exQuarterYear*/,"")
			oChart:SetProperty("Label",16/*exMonth*/,"month")
			oChart:SetProperty("Label",17/*exThirdMonth*/,"")
			oChart:SetProperty("Label",256/*exWeek*/,"week")
			oChart:SetProperty("Label",4096/*exDay*/,"day")
			oChart:SetProperty("Label",65536/*exHour*/,"hour")
			oChart:SetProperty("Label",1048576/*exMinute*/,"")
			oChart:SetProperty("Label",16777216/*exSecond*/,"")
			oChart:ShowNonworkingDates := .F.
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:UnitWidth := 32
			oChart:UnitScale := 4096/*exDay*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A"),"Task","01/02/2001","01/06/2001","K1")
			oItems:AddBar(oItems:AddItem("Task B"),"Task","01/06/2001","01/10/2001","K1")
			oItems:AddBar(oItems:AddItem("Task C"),"Task","01/10/2001","01/14/2001","K1")
			oItems:AddBar(oItems:AddItem(""),"","01/08/2001","01/08/2001","Info","Click the <b>middle</b> mouse button and start dragging")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2142
Is it possible to display the header using multiple lines, while chart display multiple levels (sample 2)

PROCEDURE OnAddColumn(oG2antt,Column)
	/*Column.Def(52) = 4*/
	/*Column.Def(53) = 4*/

RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddColumn := {|Column| OnAddColumn(oG2antt,Column)} /*Fired after a new column has been added.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.T.,256)
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 1/*Flat*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Column")
			oColumns:Add("C1"):HTMLCaption := "<b>C<off 4>1</b><br>left"
			oColumns:Add("C2"):HTMLCaption := "<c><b>C<off 4>2</b><br><c>center"
			oColumns:Add("C3"):HTMLCaption := "<r><b>C<off 4>3</b><br><r>right"
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2141
Is there any way to control the z-order of a TimeZone

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:UnitWidth := 15
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2009"
			oChart:MarkTimeZone("Top","01/01/2010","01/05/2010",16711680,"1;;<fgcolor=FFFFFF>Top;1")
			oChart:MarkTimeZone("Partial","01/08/2010","01/12/2010",16711680,"50;;<fgcolor=FFFFFF>Partial;1")
			oChart:MarkTimeZone("Default","01/15/2010","01/19/2010",16711680,";;<fgcolor=FFFFFF>Default;1")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2140
Is it possible to display the header using multiple lines, while chart display multiple levels (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():LevelCount := 2
		oG2antt:HeaderHeight := 18
		oG2antt:HeaderSingleLine := .F.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:Columns():Add("This is just a column that should break the header."):Width := 32
		oG2antt:Columns():Add("This is just another column that should break the header.")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2139
Difference between HistogramValueFromPoint and HistogramValue (sample 2)

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL oChart
	LOCAL format,v1,v2,vMax,vMin
	oChart := oG2antt:Chart()
		v1 := oChart:HistogramValueFromPoint(-1,-1)
		v2 := oChart:HistogramValue(oChart:DateFromPoint(-1,-1))
		vMin := oChart:HistogramValue("min")
		vMax := oChart:HistogramValue("max")
	format := oG2antt:FormatABC("`<b>ValueFromPoint</b>: ` + A + `<br>ValueFromDate: ` + B",v1,v2)
	format := oG2antt:FormatABC("A  + `<br>Min: ` + B + `<br>Max: ` + C",format,vMin,vMax)
	oG2antt:ShowToolTip(Transform(format,""),,,"16","16")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,40)
			oChart:FirstVisibleDate := "06/09/2005"
			oChart:HistogramVisible := .T.
			oChart:HistogramView := 8304/*exHistogramGroupCumulative+exHistogramAllItems*/
			oChart:HistogramHeight := 128
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := oBar:Pattern()
				oBar:HistogramType := 256/*exHistCumulative*/
				oBar:HistogramItems := -6
				oBar:SetProperty("HistogramRulerLinesColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
				oBar:HistogramBorderSize := 1
				oBar:SetProperty("HistogramBorderColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
				oBar:HistogramCumulativeOriginalColorBars := 0/*exChangeColor*/
				oBar:HistogramCumulativeShowLegend := -1
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task"),"Task","06/10/2005","06/14/2005","")
			oItems:AddBar(oItems:AddItem("Task"),"Task","06/11/2005","06/15/2005","")
			oItems:AddBar(oItems:AddItem("Task"),"Task","06/12/2005","06/16/2005","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2138
Difference between HistogramValueFromPoint and HistogramValue (sample 1)

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL oChart
	LOCAL format,v1,v2,vMax,vMin
	oChart := oG2antt:Chart()
		v1 := oChart:HistogramValueFromPoint(-1,-1)
		v2 := oChart:HistogramValue(oChart:DateFromPoint(-1,-1))
		vMin := oChart:HistogramValue("min")
		vMax := oChart:HistogramValue("max")
	format := oG2antt:FormatABC("`<b>ValueFromPoint</b>: ` + A + `<br>ValueFromDate: ` + B",v1,v2)
	format := oG2antt:FormatABC("A  + `<br>Min: ` + B + `<br>Max: ` + C",format,vMin,vMax)
	oG2antt:ShowToolTip(Transform(format,""),,,"16","16")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,40)
			oChart:FirstVisibleDate := "06/09/2005"
			oChart:HistogramVisible := .T.
			oChart:HistogramView := 112/*exHistogramAllItems*/
			oChart:HistogramHeight := 128
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := oBar:Pattern()
				oBar:HistogramType := 0/*exHistOverload*/
				oBar:HistogramItems := -6
				oBar:SetProperty("HistogramRulerLinesColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
				oBar:HistogramBorderSize := 1
				oBar:SetProperty("HistogramBorderColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task"),"Task","06/10/2005","06/14/2005","")
			oItems:AddBar(oItems:AddItem("Task"),"Task","06/11/2005","06/15/2005","")
			oItems:AddBar(oItems:AddItem("Task"),"Task","06/12/2005","06/16/2005","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2137
I am using the Inside-Zoom feature, but the inside grid lines are more dashed the dotted

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oInsideZoomFormat
	LOCAL oInsideZooms

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:UnitScale := 4096/*exDay*/
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2008"
			oInsideZoomFormat := oChart:DefaultInsideZoomFormat()
				oInsideZoomFormat:InsideLabel := "<%hh%>"
				oInsideZoomFormat:InsideUnit := 65536/*exHour*/
				oInsideZoomFormat:InsideCount := 8
				oInsideZoomFormat:GridLineStyle := 512/*exGridLinesGeometric*/
			oChart:AllowInsideZoom := .T.
			oInsideZooms := oChart:InsideZooms()
				oInsideZooms:Add("01/04/2008")
			oChart:DrawGridLines := 2/*exVLines*/
			oChart:ShowNonworkingDates := .F.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2136
I am using expressions for exBarEffort, but the histogram does not show correctly the data

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oInsideZoom
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "10/05/2020"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:HistogramHeight := 96
			oChart:HistogramVisible := .T.
			oChart:AllowInsideZoom := .T.
			oChart:DrawGridLines := -1/*exAllLines*/
			oInsideZoom := oChart:InsideZooms():Add("10/07/2020")
				oInsideZoom:Width := 196
			oChart:DefaultInsideZoomFormat():GridLineStyle := 48/*exGridLinesSolid*/
			oBar := oChart:Bars():Item("Task")
				oBar:HistogramPattern := oBar:Pattern()
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Def",21/*exBarEffort*/,"(hour(value) > 5 and hour(value) < 18) ? 2 : 0")
			oChart:HistogramUnitScale := 65536/*exHour*/
		oG2antt:Columns():Add("Tasks"):FormatColumn := "`Task ` + (1 index ``)"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem(""),"Task","10/07/2020","10/12/2020")
			oItems:AddBar(oItems:AddItem(""),"Task","10/08/2020","10/13/2020")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2135
How can I specify the z-order of bars to be shown within the chart's histogram

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "10/05/2020"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:HistogramHeight := 96
			oChart:HistogramVisible := .T.
			oBar := oChart:Bars():Add("A")
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar:HistogramPattern := 1/*exPatternSolid*/
				oBar:HistogramItems := -6
				oBar:HistogramCumulativeOriginalColorBars := 1/*exKeepOriginalColor*/
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oBar1 := oChart:Bars():CallMethod("Copy","A","B")
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
				oBar1:HistogramCumulativeOriginalColorBars := 1/*exKeepOriginalColor*/
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<%=%0%>")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oChart:HistogramView := 8304/*exHistogramGroupCumulative+exHistogramAllItems*/
			oChart:HistogramZOrder := "A,B"
		oG2antt:Columns():Add("Tasks"):FormatColumn := "`Task ` + (1 index ``)"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem(""),"A","10/07/2020","10/12/2020")
			oItems:AddBar(oItems:AddItem(""),"A","10/08/2020","10/13/2020")
			oItems:AddBar(oItems:AddItem(""),"B","10/09/2020","10/14/2020")
			oItems:AddBar(oItems:AddItem(""),"B","10/10/2020","10/15/2020")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2134
How can I show cumulative histogram for two or more different types of bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "10/05/2020"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:HistogramHeight := 96
			oChart:HistogramVisible := .T.
			oBar := oChart:Bars():Add("A")
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar:HistogramPattern := 1/*exPatternSolid*/
				oBar:HistogramItems := -6
				oBar:HistogramCumulativeOriginalColorBars := 1/*exKeepOriginalColor*/
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oBar1 := oChart:Bars():CallMethod("Copy","A","B")
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
				oBar1:HistogramCumulativeOriginalColorBars := 1/*exKeepOriginalColor*/
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<%=%0%>")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oChart:HistogramView := 8304/*exHistogramGroupCumulative+exHistogramAllItems*/
		oG2antt:Columns():Add("Tasks"):FormatColumn := "`Task ` + (1 index ``)"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem(""),"A","10/07/2020","10/12/2020")
			oItems:AddBar(oItems:AddItem(""),"A","10/08/2020","10/13/2020")
			oItems:AddBar(oItems:AddItem(""),"B","10/09/2020","10/14/2020")
			oItems:AddBar(oItems:AddItem(""),"B","10/10/2020","10/15/2020")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2133
I would like to display a solid line between "root" items, and dotted lines (default) between child items. How can I do that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oConditionalFormat
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABMsIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIXRpFMbxAKQahLEiTIgGUYJHgmK4tQLHb7zGAABRDDSOIDnGQJXhaI4JQSMMQDGLAZxVFiPRhAWLpBh+PQATrOdLUfSjVwhBKAQEBA==")
		oColumn := oG2antt:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oG2antt:Columns():Add("Position")
			oColumn1:FormatColumn := "((1 rindex ``) contains `.`) = 0"
			oColumn1:Visible := .F.
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%C1")
			oConditionalFormat:SetProperty("BackColor",0x1e0e0e0)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			h := oItems:AddItem("Root 3")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2132
I can not center or align the cell's caption and icon, when it displays the hierarchy

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"<img>1</img> Task (left)")
			hChild := oItems:InsertItem(h,,"<c><img>2</img> Task (center)")
			hChild := oItems:InsertItem(h,,"<r>Task (right) <img>3</img>")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2131
How do I mask for float/integer number

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor,oEditor1,oEditor2,oEditor3,oEditor4,oEditor5,oEditor6,oEditor7,oEditor8
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .T.
		oG2antt:Columns():Add("Type"):Width := 32
		oG2antt:Columns():Add("Editor")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Integer")
			oItems:SetProperty("CellValue",h,1,"12")
			oEditor := oItems:CellEditor(h,1)
				oEditor:EditType := 1/*EditType*/
				oEditor:Numeric := -1/*exInteger*/
			h := oItems:AddItem("Integer (mask, group)")
			oItems:SetProperty("CellValue",h,1,"10002")
			oItems:SetProperty("FormatCell",h,1,"value format `0||`")
			oEditor1 := oItems:CellEditor(h,1)
				oEditor1:EditType := 8/*MaskType*/
				oEditor1:Mask := ";;;float,digits=0,invalid=empty,warning=invalid character"
			h := oItems:AddItem("Integer (mask, no group)")
			oItems:SetProperty("CellValue",h,1,"10002")
			oItems:SetProperty("FormatCell",h,1,"value format `0|0|`")
			oEditor2 := oItems:CellEditor(h,1)
				oEditor2:EditType := 8/*MaskType*/
				oEditor2:Mask := ";;;float,digits=0,grouping=,invalid=empty,warning=invalid character"
			h := oItems:AddItem("Float")
			oItems:SetProperty("CellValue",h,1,"+12.34E+2")
			oEditor3 := oItems:CellEditor(h,1)
				oEditor3:EditType := 1/*EditType*/
				oEditor3:Numeric := 1/*exFloat*/
			h := oItems:AddItem("Float (no signs)")
			oItems:SetProperty("CellValue",h,1,"12.34E-2")
			oEditor4 := oItems:CellEditor(h,1)
				oEditor4:EditType := 1/*EditType*/
				oEditor4:Numeric := 769/*exDisableSigns+exFloat*/
			h := oItems:AddItem("Float-Integer")
			oItems:SetProperty("CellValue",h,1,"+12.34")
			oEditor5 := oItems:CellEditor(h,1)
				oEditor5:EditType := 1/*EditType*/
				oEditor5:Numeric := 2/*exFloatInteger*/
			h := oItems:AddItem("Float-Integer (no signs)")
			oItems:SetProperty("CellValue",h,1,"12.34")
			oEditor6 := oItems:CellEditor(h,1)
				oEditor6:EditType := 1/*EditType*/
				oEditor6:Numeric := 770/*exDisableSigns+exFloatInteger*/
			h := oItems:AddItem("Float (mask,group)")
			oItems:SetProperty("CellValue",h,1,"10002.34")
			oItems:SetProperty("FormatCell",h,1,"value format `2`")
			oEditor7 := oItems:CellEditor(h,1)
				oEditor7:EditType := 8/*MaskType*/
				oEditor7:Mask := ";;;float,invalid=empty,warning=invalid character"
			h := oItems:AddItem("Float (mask, no group)")
			oItems:SetProperty("CellValue",h,1,"10002.34")
			oItems:SetProperty("FormatCell",h,1,"value format `2|0|`")
			oEditor8 := oItems:CellEditor(h,1)
				oEditor8:EditType := 8/*MaskType*/
				oEditor8:Mask := ";;;float,grouping=,invalid=empty,warning=invalid character"
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2130
Is it possible to offset (horizontally) the bar's caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("HOffset")
		oG2antt:HeaderAppearance := 1/*Flat*/
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -2/*exRowLines*/
			oChart:FirstVisibleDate := "12/16/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 32/*exPatternBox*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 164,164,164 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:Height := 15
				oBar:SetProperty("Def",3/*exBarCaption*/,"label")
		oItems := oG2antt:Items()
			h := oItems:AddItem("right")
			oItems:AddBar(h,"Task","12/22/2000","12/27/2000")
			oItems:SetProperty("ItemBar",h,"",4/*exBarHAlignCaption*/,2)
			h := oItems:AddItem("right - 4")
			oItems:AddBar(h,"Task","12/22/2000","12/27/2000")
			oItems:SetProperty("ItemBar",h,"",4/*exBarHAlignCaption*/,2)
			oItems:SetProperty("ItemBar",h,"",58/*exBarCaptionHOffset*/,-4)
			h := oItems:AddItem("left")
			oItems:AddBar(h,"Task","12/22/2000","12/27/2000")
			oItems:SetProperty("ItemBar",h,"",4/*exBarHAlignCaption*/,0)
			h := oItems:AddItem("left + 4")
			oItems:AddBar(h,"Task","12/22/2000","12/27/2000")
			oItems:SetProperty("ItemBar",h,"",4/*exBarHAlignCaption*/,0)
			oItems:SetProperty("ItemBar",h,"",58/*exBarCaptionHOffset*/,4)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2129
Is it possible to always center the bar's caption (even if the item-bar is partially visible)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Align")
		oG2antt:HeaderAppearance := 1/*Flat*/
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -2/*exRowLines*/
			oChart:FirstVisibleDate := "12/23/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 32/*exPatternBox*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 164,164,164 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:Height := 15
		oItems := oG2antt:Items()
			h := oItems:AddItem("default")
			oItems:AddBar(h,"Task","12/22/2000","12/27/2000","","label")
			oItems:SetProperty("ItemBar",h,"",4/*exBarHAlignCaption*/,1)
			h := oItems:AddItem("default + 32")
			oItems:AddBar(h,"Task","12/22/2000","12/27/2000","","label")
			oItems:SetProperty("ItemBar",h,"",4/*exBarHAlignCaption*/,33)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2128
How do I set an extra data for each item
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL i
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(i,"") )
	DevOut( Transform(oG2antt:Items:ItemData(i),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .T.
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			oItems:SetProperty("ItemData",oItems:AddItem("method 1"),"your extra data of method 1")
			oItems:InsertItem(0,"your extra data of method 2","method 2")
		oItems1 := oG2antt:Items()
			oItems1:DefaultItem := oItems1:AddItem("method 3")
			oItems1:SetProperty("ItemData",0,"your extra data of method 3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2127
Is it possible to show the position of rows the into the chart section

PROCEDURE OnBeforeExpandItem(oG2antt,Item,Cancel)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oG2antt,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/

		oG2antt:BeginUpdate()
		oG2antt:Indent := 16
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:HasLines := 1/*exSolidLine*/
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:FullRowSelect := 0/*exColumnSel*/
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:Visible := .F.
			oColumn:FormatColumn := "`<r><bgcolor 000000><fgcolor FFFFFF> ` + 1 apos `` + ` </fgcolor></bgcolor>`"
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
		oChart := oG2antt:Chart()
			oChart:ColumnsFormatLevel := ",|,1:64"
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:ShowCollapsedBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:DrawGridLines := 1/*exHLines*/
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 3/*exOverlaidBarsStack*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 196,196,196 } )  , .F. ))
				oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 196,196,196 } )  , .F. ))
				oBar:Pattern := 32/*exPatternBox*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project 1")
			h1 := oItems:InsertItem(h,,"Resources")
			oItems:AddBar(h1,"Task","09/21/2006","09/25/2006","A")
			oItems:AddBar(h1,"Task","09/24/2006","09/28/2006","B")
			oItems:AddBar(h1,"Task","09/27/2006","09/29/2006","C")
			h := oItems:AddItem("Project 2")
			h1 := oItems:InsertItem(h,,"Resources")
			oItems:AddBar(h1,"Task","09/21/2006","09/25/2006","A")
			oItems:AddBar(h1,"Task","09/24/2006","09/28/2006","B")
			oItems:AddBar(h1,"Task","09/27/2006","09/29/2006","C")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2126
I do not like to specify the item padding for every column I add. The question is how can I do it automatically

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AttachTemplate("handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}")
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:GridLineStyle := 32/*exGridLinesVSolid*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Item")
			oColumn := oColumns:Add("Pos")
				oColumn:Position := 0
				oColumn:Width := 32
				oColumn:AllowSizing := .F.
				oColumn:FormatColumn := "1 index ``"
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2125
Stack vs Cascade

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:HeaderAppearance := 1/*Flat*/
		oG2antt:Columns():Add("Type")
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars():CallMethod("Copy","Task","Stack"):OverlaidType := 3/*exOverlaidBarsStack*/
			oChart:Bars():CallMethod("Copy","Task","AStack"):OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
			oChart:Bars():CallMethod("Copy","Task","Cascade"):OverlaidType := 4/*exOverlaidBarsCascade*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Stack")
			oItems:AddBar(h,"Stack","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Stack","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Stack","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"Stack","01/02/2001","01/07/2001","A4")
			oItems:AddBar(h,"Stack","01/08/2001","01/12/2001","A5")
			oItems:AddItem()
			h := oItems:AddItem("Stack-AutoArrange")
			oItems:AddBar(h,"AStack","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"AStack","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"AStack","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"AStack","01/02/2001","01/07/2001","A4")
			oItems:AddBar(h,"AStack","01/08/2001","01/12/2001","A5")
			oItems:AddItem()
			h := oItems:AddItem("Cascade")
			oItems:AddBar(h,"Cascade","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Cascade","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Cascade","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"Cascade","01/02/2001","01/07/2001","A4")
			oItems:AddBar(h,"Cascade","01/08/2001","01/12/2001","A5")
			oItems:AddItem()
			oItems:SetProperty("ItemBar",0,"<*>",3/*exBarCaption*/,"<%=%9%>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2124
How can I change the Exclude field in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:SetProperty("HTMLPicture","exclude","gCJKBOI4NBQaBQAhQNJJIIhShQACERCAEAcRdrdcUQhQDOZCJJUBEjbbhJ7giIJOBILJziJvl4BeKibhDiIZOhFLB0KZvMx0O5hORlAB3owuNJuNZzMZhOBlFxvORnTbuHgaiIeKBMKhFf9fDIcEoPCAVEAlGI4HhBBYMCARCQVGg4IhVMCAWC2XY1Q7WJ8RBB0KROKYAYDBbzicjndD6fA/VsRHRJIhBkRbMYIGwGAQjA2fRYOEBoYjBFBx1ATCgCGQ8M7OTjSaJMDRDKIwYu5DrIMBgSAADKJTqhBhyRApAA3FAucZPPilokRJJFJxEVxCMCCgIA==")
		oG2antt:SetProperty("Description",25/*exFilterBarExclude*/,"<img>exclude</img>")
		oColumn := oG2antt:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2123
How can I change the Exclude field in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:SetProperty("Description",25/*exFilterBarExclude*/,"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>")
		oColumn := oG2antt:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2122
The grid lines looks different then before. What should I do

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/
		oG2antt:Chart():DrawGridLines := oG2antt:DrawGridLines()
		oG2antt:Chart():GridLineStyle := oG2antt:GridLineStyle()
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2121
How can I hide the task/bar's extra-caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "01/01/2011"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",44/*exBarExtraCaption*/,"<%=%C0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Def",45/*exBarExtraCaptionHAlign*/,16)
		oG2antt:Columns():Add("Task")
		oColumn := oG2antt:Columns():Add("Show")
			oEditor := oColumn:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,57)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2011","01/07/2011")
			oItems:SetProperty("ItemBar",oItems:FirstVisibleItem(),"",57/*exBarShowExtraCaption*/,.F.)
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2011","01/08/2011")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2120
How can I hide the task/bar's caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "01/01/2011"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%C0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
		oG2antt:Columns():Add("Task")
		oColumn := oG2antt:Columns():Add("Show")
			oEditor := oColumn:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,56)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2011","01/07/2011")
			oItems:SetProperty("ItemBar",oItems:FirstVisibleItem(),"",56/*exBarShowCaption*/,.F.)
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2011","01/08/2011")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2119
Can I sort the column by check-state

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumn := oG2antt:Columns():Add("Check")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SortType := 32/*exSortByState*/
		oItems := oG2antt:Items()
			oItems:AddItem()
			oItems:SetProperty("CellState",oItems:AddItem(),0,1)
			oItems:SetProperty("CellState",oItems:AddItem(),0,1)
			oItems:AddItem()
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2118
Can I sort the column by image

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oG2antt:Columns():Add("Image")
			oColumn:SortType := 48/*exSortByImage*/
		oItems := oG2antt:Items()
			oItems:SetProperty("CellImage",oItems:AddItem(),0,3)
			oItems:AddItem()
			oItems:SetProperty("CellImage",oItems:AddItem(),0,1)
			oItems:SetProperty("CellImage",oItems:AddItem(),0,2)
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2117
Can I sort the column by value(numeric)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumn := oG2antt:Columns():Add("Value")
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:FormatColumn := "`<fgcolor=808080><off 4><font ;6> ` + (1 index ``)  + ` </font></off></fgcolor>` + value"
			oColumn:SortType := 17/*exSortByValue+SortNumeric*/
		oItems := oG2antt:Items()
			oItems:AddItem("1")
			oItems:AddItem("10")
			oItems:AddItem("2")
			oItems:AddItem("20")
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2116
Can I sort a column by cell's state (checked, unchecked) rather than caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumn := oG2antt:Columns():Add("Check")
			oEditor := oColumn:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn:SortType := 1/*SortNumeric*/
		oItems := oG2antt:Items()
			oItems:AddItem(.T.)
			oItems:AddItem(.F.)
			oItems:AddItem(.F.)
			oItems:AddItem(.T.)
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2115
How can I highlight(bold) the items that displays milestones (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oConditionalFormat
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumns:Add("Start"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumns:Add("End"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,543)
			oColumn := oColumns:Add("Days")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
				oColumn:FormatColumn := "value ? value : ``"
			oColumn1 := oColumns:Add("Type")
				oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,0)
				oColumn1:Visible := .F.
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%4 = `Milestone`")
			oConditionalFormat:Bold := .T.
			oConditionalFormat:Italic := .T.
			oConditionalFormat:ApplyTo := -1/*exFormatToItems*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2010"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oBar := oChart:Bars():Add("Task:Split")
				oBar:Shortcut := "Task"
				oBar:SetProperty("Def",20/*exBarKeepWorkingCount*/,.T.)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("M1"),"Milestone","09/24/2010","09/24/2010")
			oItems:AddBar(oItems:AddItem("T1"),"Task","09/24/2010","09/28/2010")
			oItems:AddBar(oItems:AddItem("T2"),"Task","09/27/2010","09/28/2010")
			oItems:AddBar(oItems:AddItem("M3"),"Milestone","09/28/2010","09/28/2010")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2114
How can I highlight(bold) the items that displays milestones (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oConditionalFormat
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumns:Add("Start"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumns:Add("End"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,543)
			oColumn := oColumns:Add("Days")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
				oColumn:FormatColumn := "value ? value : ``"
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%3 = 0")
			oConditionalFormat:Bold := .T.
			oConditionalFormat:Italic := .T.
			oConditionalFormat:ApplyTo := -1/*exFormatToItems*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2010"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oBar := oChart:Bars():Add("Task:Split")
				oBar:Shortcut := "Task"
				oBar:SetProperty("Def",20/*exBarKeepWorkingCount*/,.T.)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("M1"),"Milestone","09/24/2010","09/24/2010")
			oItems:AddBar(oItems:AddItem("T1"),"Task","09/24/2010","09/28/2010")
			oItems:AddBar(oItems:AddItem("T2"),"Task","09/27/2010","09/28/2010")
			oItems:AddBar(oItems:AddItem("M3"),"Milestone","09/28/2010","09/28/2010")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2113
Bars with gradient shows no border or frame arround. What can be done (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oG2antt:DefaultItemHeight := 24
		oBar := oG2antt:Chart():Bars():Add("E1")
			oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
			oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,0 } )  , .F. ))
			oBar:Pattern := 96/*exPatternGradientVBox+exPatternBox*/
			oBar:Height := 20
		oBar1 := oG2antt:Chart():Bars():Add("E2")
			oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
			oBar1:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oBar1:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,0 } )  , .F. ))
			oBar1:Pattern := 96/*exPatternGradientVBox+exPatternBox*/
			oBar1:Height := 20
			oBar1:SetProperty("Def",53/*exBarBackgroundExt*/,"[frame=RGB(255,0,0),framethick]")
		oItems := oG2antt:Items()
			oItems:AddItem()
			h := oItems:AddItem("no border")
			oItems:AddBar(h,"E1","01/02/2001","01/08/2001","")
			h := oItems:AddItem("w/h boder")
			oItems:AddBar(h,"E2","01/02/2001","01/08/2001","")
			oItems:AddItem()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2112
Bars with gradient shows no border or frame arround. What can be done (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oG2antt:DefaultItemHeight := 24
		oBar := oG2antt:Chart():Bars():Add("E2")
			oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
			oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,0 } )  , .F. ))
			oBar:Pattern := 96/*exPatternGradientVBox+exPatternBox*/
			oBar:Height := 20
		oItems := oG2antt:Items()
			oItems:AddItem()
			h := oItems:AddItem("no border")
			oItems:AddBar(h,"E2","01/02/2001","01/08/2001","")
			h := oItems:AddItem("w/h boder")
			oItems:AddBar(h,"E2","01/02/2001","01/08/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"[frame=RGB(255,0,0),framethick]")
			oItems:AddItem()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2111
Is it possible to display auto-numbers (rows-numbers) for non-empty items only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.F.,128)
		oColumns := oG2antt:Columns()
			oColumns:Add("Items")
			oColumn := oColumns:Add("Pos")
				oColumn:FormatColumn := "len(%C0) ? 1 pos `` : ``"
				oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("")
			oItems:AddItem("Item B")
			oItems:AddItem("")
			oItems:AddItem("Item C")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2110
Is it possible to separate the group of items using horizontal-lines (root-items)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oConditionalFormat
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABLEIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRiAUbQSKEPxLEiPmqSHIEWwtDiBZgieTpNhAMg1CTNU4RAKoYRzBKeZ7kGZIVjKMofURRDpxBBMAkB")
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:DefaultItemHeight := 24
		oG2antt:SelBackMode := 1/*exTransparent*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,196)
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("Default")
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:PartialCheck := .T.
			oColumn1 := oColumns:Add("Position")
				oColumn1:FormatColumn := "1 + ((1 rpos ``) contains `.`)"
				oColumn1:Visible := .F.
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%C1")
			oConditionalFormat:SetProperty("BackColor",0x1000000)
			oConditionalFormat:SetProperty("ChartBackColor",oConditionalFormat:BackColor())
		oItems := oG2antt:Items()
			h := oItems:AddItem("Group 1")
			oItems:AddBar(oItems:InsertItem(h,,"Child 1"),"Task","01/03/2001","01/13/2001")
			oItems:AddBar(oItems:InsertItem(h,,"Child 2"),"Task","01/04/2001","01/14/2001")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Group 2")
			oItems:AddBar(oItems:InsertItem(h,,"Child 1"),"Task","01/03/2001","01/13/2001")
			oItems:AddBar(oItems:InsertItem(h,,"Child 2"),"Task","01/04/2001","01/14/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2109
How can specify a black pattern for the task

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
		oG2antt:Columns():Add("Frames")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/12/2001","bar A")
			oItems:SetProperty("ItemBar",h,"bar A",33/*exBarColor*/,1)
			oItems:AddBar(h,"Task","01/14/2001","01/24/2001","bar B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2108
Can I define a bar so it automatically fills the current item/row height (same height)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):Height := -1
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A"),"Task","01/02/2001","01/05/2001")
			h := oItems:AddItem("Task A")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","")
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,255)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2107
How can I highlight a specified date for the entire chart (Method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:UnitWidth := 18
			oChart:LevelCount := 2
			oChart:MarkTimeZone("zone1","01/08/2001","01/09/2001",0)
			oChart:MarkTimeZone("zone2","01/02/2001","01/04/2001",0,"50")
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("Task(I)")
			oItems:AddBar(h,"Task","01/05/2001","01/12/2001","I")
			oItems:AddItem("")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2106
How can I highlight a specified date for the entire chart, including the header (Method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oInsideZoomFormat
	LOCAL oInsideZooms
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:UnitWidth := 18
			oChart:LevelCount := 2
			oChart:AllowInsideZoom := .T.
			oChart:AllowResizeInsideZoom := .F.
			oChart:InsideZoomOnDblClick := .F.
			oInsideZoomFormat := oChart:DefaultInsideZoomFormat()
				oInsideZoomFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
				oInsideZoomFormat:SetProperty("BackColorChart",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
				oInsideZoomFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
			oInsideZooms := oChart:InsideZooms()
				oInsideZooms:SplitBaseLevel := .F.
				oInsideZooms:DefaultWidth := 18
				oInsideZooms:Add("01/08/2001"):AllowInsideFormat := .F.
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("Task(I)")
			oItems:AddBar(h,"Task","01/05/2001","01/12/2001","I")
			oItems:AddItem("")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2105
How can I highlight a specified date of a specified item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oNote
	LOCAL oNotes
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:UnitWidth := 18
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("Task(D)")
			oItems:AddBar(h,"Task","01/05/2001","01/12/2001","D")
			oItems:AddItem("")
		oNotes := oG2antt:Chart():Notes()
			oNote := oNotes:Add("NoteD",h,"01/08/2001","<b><%dd%></b><br><%m%><br><%yy%>")
				oNote:SetProperty("PartFixedWidth",1/*exNoteEnd*/,18)
				oNote:SetProperty("PartShadow",1/*exNoteEnd*/,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2104
How can I display the start/end of the task within its margins (notes)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oNote,oNote1
	LOCAL oNotes
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:UnitWidth := 18
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("Task(T)")
			oItems:AddBar(h,"Task","01/05/2001","01/12/2001","T")
			oItems:AddItem("")
		oNotes := oG2antt:Chart():Notes()
			oNote := oNotes:Add("NoteTS",h,"T","")
				oNote:ShowLink := 0/*exNoteLinkHidden*/
				oNote:SetProperty("PartText",0/*exNoteStart*/,"<%d%>")
				oNote:SetProperty("PartHOffset",0/*exNoteStart*/,9)
				oNote:SetProperty("PartFixedWidth",0/*exNoteStart*/,18)
			oNote1 := oNotes:Add("NoteTE",h,"T","")
				oNote1:RelativePosition := "E-1"
				oNote1:ShowLink := 0/*exNoteLinkHidden*/
				oNote1:SetProperty("PartText",0/*exNoteStart*/,"<%d%>")
				oNote1:SetProperty("PartHOffset",0/*exNoteStart*/,9)
				oNote1:SetProperty("PartFixedWidth",0/*exNoteStart*/,18)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2103
Is it possible to show the tasks not-overlaid when the item is collapsed and overlaid once the user expands the item

PROCEDURE OnBeforeExpandItem(oG2antt,Item,Cancel)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oG2antt,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/

		oG2antt:BeginUpdate()
		oG2antt:Indent := 16
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:HasLines := 1/*exSolidLine*/
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:ShowCollapsedBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:DrawGridLines := 1/*exHLines*/
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 3/*exOverlaidBarsStack*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 196,196,196 } )  , .F. ))
				oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 196,196,196 } )  , .F. ))
				oBar:Pattern := 32/*exPatternBox*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project 1")
			h1 := oItems:InsertItem(h,,"Resources")
			oItems:AddBar(h1,"Task","09/21/2006","09/25/2006","A")
			oItems:AddBar(h1,"Task","09/24/2006","09/28/2006","B")
			oItems:AddBar(h1,"Task","09/27/2006","09/29/2006","C")
			h := oItems:AddItem("Project 2")
			h1 := oItems:InsertItem(h,,"Resources")
			oItems:AddBar(h1,"Task","09/21/2006","09/25/2006","A")
			oItems:AddBar(h1,"Task","09/24/2006","09/28/2006","B")
			oItems:AddBar(h1,"Task","09/27/2006","09/29/2006","C")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2102
Is it possible to display the label of the level without truncating / no clip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1,oLevel2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstWeekDay := 0/*exSunday*/
			oChart:FirstVisibleDate := "12/31/2000"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 3
			oLevel := oChart:Level(0)
				oLevel:Label := 16
				oLevel:FormatLabel := "`<c>` + value"
			oLevel1 := oChart:Level(1)
				oLevel1:Label := 256
				oLevel1:FormatLabel := "`<c>` + value"
			oLevel2 := oChart:Level(2)
				oLevel2:Alignment := 256/*0x100+*/
				oLevel2:FormatLabel := "weekday(dvalue) = 0 ? `<b>` + value : ``"
				oLevel2:DrawTickLines := 0/*exLevelNoLine*/
				oLevel2:DrawTickLinesFrom(1,1/*exLevelDotLine*/)
				oLevel2:DrawGridLines := .T.
			oChart:UnitWidth := 6
			oChart:DrawGridLines := -1/*exAllLines*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2101
How do I get the item's auto-number, when using FormatColumn property, as CellValue gets empty

PROCEDURE OnSelectionChanged(oG2antt)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( "pos: " )
		DevOut( oItems:CellCaption(oItems:FocusItem(),1) )
		DevOut( "rpos(1): " )
		DevOut( oItems:CellCaption(oItems:FocusItem(),2) )
		DevOut( "rpos(2): " )
		DevOut( oItems:CellCaption(oItems:FocusItem(),3) )
		DevOut( "apos: " )
		DevOut( oItems:CellCaption(oItems:FocusItem(),4) )
		DevOut( "index: " )
		DevOut( oItems:CellCaption(oItems:FocusItem(),5) )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,hSel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:SelectionChanged := {|| OnSelectionChanged(oG2antt)} /*Fired after a new item has been selected.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Items")
			oColumn := oColumns:Add("pos")
				oColumn:FormatColumn := "1 pos ``"
				oColumn:Position := 0
				oColumn:Width := 48
				oColumn:AllowSizing := .F.
			oColumn1 := oColumns:Add("rpos(1)")
				oColumn1:FormatColumn := "1 rpos ``"
				oColumn1:Position := 1
				oColumn1:Width := 48
				oColumn1:AllowSizing := .F.
			oColumn2 := oColumns:Add("rpos(2)")
				oColumn2:FormatColumn := "1 rpos `.||A-Z`"
				oColumn2:Position := 2
				oColumn2:Width := 48
				oColumn2:AllowSizing := .F.
			oColumn3 := oColumns:Add("apos")
				oColumn3:FormatColumn := "1 apos ``"
				oColumn3:Position := 3
				oColumn3:Width := 48
				oColumn3:AllowSizing := .F.
			oColumn4 := oColumns:Add("index")
				oColumn4:FormatColumn := "1 index ``"
				oColumn4:Position := 4
				oColumn4:Width := 48
				oColumn4:AllowSizing := .F.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:InsertItem(h,,"Child 1")
			hSel := oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oG2antt:EndUpdate()
		oG2antt:Items():SetProperty("SelectItem",hSel,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN